import java.util.Scanner;
import java.math.BigInteger;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) {
      BigInteger bda = new BigInteger(sc.next());
      BigInteger bdb = new BigInteger(sc.next());
      BigInteger gcd = bda.gcd(bdb);
      BigInteger lcm = bda.multiply(bdb).divide(gcd);
      System.out.println(gcd+" "+lcm);
    }
  }
} import java.util.Scanner; Scanner java.util import java.math.BigInteger; BigInteger java.math class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) {
      BigInteger bda = new BigInteger(sc.next());
      BigInteger bdb = new BigInteger(sc.next());
      BigInteger gcd = bda.gcd(bdb);
      BigInteger lcm = bda.multiply(bdb).divide(gcd);
      System.out.println(gcd+" "+lcm);
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) {
      BigInteger bda = new BigInteger(sc.next());
      BigInteger bdb = new BigInteger(sc.next());
      BigInteger gcd = bda.gcd(bdb);
      BigInteger lcm = bda.multiply(bdb).divide(gcd);
      System.out.println(gcd+" "+lcm);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) {
      BigInteger bda = new BigInteger(sc.next());
      BigInteger bdb = new BigInteger(sc.next());
      BigInteger gcd = bda.gcd(bdb);
      BigInteger lcm = bda.multiply(bdb).divide(gcd);
      System.out.println(gcd+" "+lcm);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) {
      BigInteger bda = new BigInteger(sc.next());
      BigInteger bdb = new BigInteger(sc.next());
      BigInteger gcd = bda.gcd(bdb);
      BigInteger lcm = bda.multiply(bdb).divide(gcd);
      System.out.println(gcd+" "+lcm);
    } sc.hasNext() sc.hasNext sc {
      BigInteger bda = new BigInteger(sc.next());
      BigInteger bdb = new BigInteger(sc.next());
      BigInteger gcd = bda.gcd(bdb);
      BigInteger lcm = bda.multiply(bdb).divide(gcd);
      System.out.println(gcd+" "+lcm);
    } BigInteger bda = new BigInteger(sc.next()); bda new BigInteger(sc.next()) BigInteger bdb = new BigInteger(sc.next()); bdb new BigInteger(sc.next()) BigInteger gcd = bda.gcd(bdb); gcd bda.gcd(bdb) bda.gcd bda bdb BigInteger lcm = bda.multiply(bdb).divide(gcd); lcm bda.multiply(bdb).divide(gcd) bda.multiply(bdb).divide bda.multiply(bdb) bda.multiply bda bdb gcd System.out.println(gcd+" "+lcm) System.out.println System.out System System.out gcd+" "+lcm gcd+" "+lcm gcd " " lcm String[] args args
import java.util.Scanner;
import java.math.BigInteger;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) {
      BigInteger bda = new BigInteger(sc.next());
      BigInteger bdb = new BigInteger(sc.next());
      BigInteger gcd = bda.gcd(bdb);
      BigInteger lcm = bda.multiply(bdb).divide(gcd);
      System.out.println(gcd+" "+lcm);
    }
  }
}