import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    }
  }

  static long gcd(long n, long m) {
    // 剰余を求めて rに入れる
    long r = n % m;
    // nがmの倍数になっているなら最大公約数は m自身になる．
    if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    }
  }
}
 import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    }
  }

  static long gcd(long n, long m) {
    // 剰余を求めて rに入れる
    long r = n % m;
    // nがmの倍数になっているなら最大公約数は m自身になる．
    if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    }
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    }
  } main {
    Scanner scanner = new Scanner(System.in);

    while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    } scanner.hasNext() scanner.hasNext scanner {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    } long a = scanner.nextLong(); a scanner.nextLong() scanner.nextLong scanner long b = scanner.nextLong(); b scanner.nextLong() scanner.nextLong scanner long gcd = gcd(a, b); gcd gcd(a, b) gcd a b long lcm = (a * b) / gcd; lcm (a * b) / gcd (a * b) a b gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] args args static long gcd(long n, long m) {
    // 剰余を求めて rに入れる
    long r = n % m;
    // nがmの倍数になっているなら最大公約数は m自身になる．
    if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    }
  } gcd {
    // 剰余を求めて rに入れる
    long r = n % m;
    // nがmの倍数になっているなら最大公約数は m自身になる．
    if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    }
  } long r = n % m; r n % m n m if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    } r == 0 r 0 {
      return m;
    } return m; m {
      return gcd(m, r);
    } return gcd(m, r); gcd(m, r) gcd m r long n n long m m public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    }
  }

  static long gcd(long n, long m) {
    // 剰余を求めて rに入れる
    long r = n % m;
    // nがmの倍数になっているなら最大公約数は m自身になる．
    if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    }
  }
} public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    }
  }

  static long gcd(long n, long m) {
    // 剰余を求めて rに入れる
    long r = n % m;
    // nがmの倍数になっているなら最大公約数は m自身になる．
    if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    }
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    while (scanner.hasNext()) {
      long a = scanner.nextLong();
      long b = scanner.nextLong();

      long gcd = gcd(a, b);
      long lcm = (a * b) / gcd;

      System.out.println(gcd + " " + lcm);
    }
  }

  static long gcd(long n, long m) {
    // 剰余を求めて rに入れる
    long r = n % m;
    // nがmの倍数になっているなら最大公約数は m自身になる．
    if (r == 0) {
      return m;
    }
    // n,mの最大公約数は m,rの最大公約数と等しい
    else {
      return gcd(m, r);
    }
  }
}

