import java.util.Scanner;

class Main {
  public static int calcGCD(int a, int b) {
    if(b > 0) {
      return calcGCD(b, a % b);  
    }   
    else {
      return a;
    }
  }
 
  public static int calcLCM(int a, int b) {
    return ((a / calcGCD(a, b)) * b);
  }

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) { 
      int a = sc.nextInt();
      int b = sc.nextInt();
      int gcd = calcGCD(a, b);      
      int lcm = calcLCM(a, b);
      System.out.println(gcd + " " + lcm);
    }    
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static int calcGCD(int a, int b) {
    if(b > 0) {
      return calcGCD(b, a % b);  
    }   
    else {
      return a;
    }
  }
 
  public static int calcLCM(int a, int b) {
    return ((a / calcGCD(a, b)) * b);
  }

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) { 
      int a = sc.nextInt();
      int b = sc.nextInt();
      int gcd = calcGCD(a, b);      
      int lcm = calcLCM(a, b);
      System.out.println(gcd + " " + lcm);
    }    
  }
} Main public static int calcGCD(int a, int b) {
    if(b > 0) {
      return calcGCD(b, a % b);  
    }   
    else {
      return a;
    }
  } calcGCD {
    if(b > 0) {
      return calcGCD(b, a % b);  
    }   
    else {
      return a;
    }
  } if(b > 0) {
      return calcGCD(b, a % b);  
    }   
    else {
      return a;
    } b > 0 b 0 {
      return calcGCD(b, a % b);  
    } return calcGCD(b, a % b); calcGCD(b, a % b) calcGCD b a % b a b {
      return a;
    } return a; a int a a int b b public static int calcLCM(int a, int b) {
    return ((a / calcGCD(a, b)) * b);
  } calcLCM {
    return ((a / calcGCD(a, b)) * b);
  } return ((a / calcGCD(a, b)) * b); ((a / calcGCD(a, b)) * b) (a / calcGCD(a, b)) a calcGCD(a, b) calcGCD a b b int a a int b b public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) { 
      int a = sc.nextInt();
      int b = sc.nextInt();
      int gcd = calcGCD(a, b);      
      int lcm = calcLCM(a, b);
      System.out.println(gcd + " " + lcm);
    }    
  } main {
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) { 
      int a = sc.nextInt();
      int b = sc.nextInt();
      int gcd = calcGCD(a, b);      
      int lcm = calcLCM(a, b);
      System.out.println(gcd + " " + lcm);
    }    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) { 
      int a = sc.nextInt();
      int b = sc.nextInt();
      int gcd = calcGCD(a, b);      
      int lcm = calcLCM(a, b);
      System.out.println(gcd + " " + lcm);
    } sc.hasNext() sc.hasNext sc { 
      int a = sc.nextInt();
      int b = sc.nextInt();
      int gcd = calcGCD(a, b);      
      int lcm = calcLCM(a, b);
      System.out.println(gcd + " " + lcm);
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int gcd = calcGCD(a, b); gcd calcGCD(a, b) calcGCD a b int lcm = calcLCM(a, b); lcm calcLCM(a, b) calcLCM a b 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;

class Main {
  public static int calcGCD(int a, int b) {
    if(b > 0) {
      return calcGCD(b, a % b);  
    }   
    else {
      return a;
    }
  }
 
  public static int calcLCM(int a, int b) {
    return ((a / calcGCD(a, b)) * b);
  }

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) { 
      int a = sc.nextInt();
      int b = sc.nextInt();
      int gcd = calcGCD(a, b);      
      int lcm = calcLCM(a, b);
      System.out.println(gcd + " " + lcm);
    }    
  }
}