import java.util.Scanner;
public class Main {
  public static long gcd (long a, long b) {
    if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a);
  }
  public static void main (String [] args) {
    Scanner s = new Scanner (System.in);
    while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static long gcd (long a, long b) {
    if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a);
  }
  public static void main (String [] args) {
    Scanner s = new Scanner (System.in);
    while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    }
  }
} Main public static long gcd (long a, long b) {
    if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a);
  } gcd {
    if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a);
  } if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a); b%a == 0 b%a b a 0 {
      return a;
    } return a; a return gcd(b%a, a); gcd(b%a, a) gcd b%a b a a long a a long b b public static void main (String [] args) {
    Scanner s = new Scanner (System.in);
    while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    }
  } main {
    Scanner s = new Scanner (System.in);
    while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    }
  } Scanner s = new Scanner (System.in); s new Scanner (System.in) while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    } s.hasNextLong() s.hasNextLong s {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    } long a = s.nextLong(); a s.nextLong() s.nextLong s long b = s.nextLong(); b s.nextLong() s.nextLong s long c = a * b; c a * b a b long d = gcd(a, b); d gcd(a, b) gcd a b c = c/d c c/d c d System.out.println(d + " " + c) System.out.println System.out System System.out d + " " + c d + " " + c d " " c String [] args args public class Main {
  public static long gcd (long a, long b) {
    if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a);
  }
  public static void main (String [] args) {
    Scanner s = new Scanner (System.in);
    while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    }
  }
} public class Main {
  public static long gcd (long a, long b) {
    if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a);
  }
  public static void main (String [] args) {
    Scanner s = new Scanner (System.in);
    while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    }
  }
} Main
import java.util.Scanner;
public class Main {
  public static long gcd (long a, long b) {
    if (b%a == 0) {
      return a;
    }
    else return gcd(b%a, a);
  }
  public static void main (String [] args) {
    Scanner s = new Scanner (System.in);
    while (s.hasNextLong()) {
      long a = s.nextLong();
      long b = s.nextLong();
      long c = a * b;
      long d = gcd(a, b);
      c = c/d;
        System.out.println(d + " " + c);
    }
  }
}