import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);
    
    long a, b, r, tmp,a1,b1,bai;
    while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);
    
    long a, b, r, tmp,a1,b1,bai;
    while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    }
    }
} Main public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);
    
    long a, b, r, tmp,a1,b1,bai;
    while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    }
    } main {

    Scanner scan = new Scanner(System.in);
    
    long a, b, r, tmp,a1,b1,bai;
    while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a a b b r r tmp tmp a1 a1 b1 b1 bai; bai while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    } scan.hasNextLong() scan.hasNextLong scan {

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    } a = scan.nextInt() a scan.nextInt() scan.nextInt scan b = scan.nextInt() b scan.nextInt() scan.nextInt scan a1 = a a1 a b1 = b b1 b if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    } a<b a b {
    tmp = a;
    a = b;
    b = tmp;
    } tmp = a tmp a a = b a b b = tmp b tmp r = a % b r a % b a b while(r!=0){
     a = b;
     b = r;
     r = a % b;
  } r!=0 r 0 {
     a = b;
     b = r;
     r = a % b;
  } a = b a b b = r b r r = a % b r a % b a b bai = a1 * b1 / b bai a1 * b1 / b a1 * b1 a1 b1 b System.out.println(b + " " + bai) System.out.println System.out System System.out b + " " + bai b + " " + bai b " " bai String[] args args public class Main {
    public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);
    
    long a, b, r, tmp,a1,b1,bai;
    while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    }
    }
} public class Main {
    public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);
    
    long a, b, r, tmp,a1,b1,bai;
    while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);
    
    long a, b, r, tmp,a1,b1,bai;
    while(scan.hasNextLong()){

    a = scan.nextInt();
    b = scan.nextInt();
    a1 = a;
    b1 = b;
 
    //?????¶??° a > b ????¢?????????\??? 
    if(a<b){
    tmp = a;
    a = b;
    b = tmp;
    }
 
  // ?????????????????????????????? 
    r = a % b;
     while(r!=0){
     a = b;
     b = r;
     r = a % b;
  }
    bai = a1 * b1 / b;
  //* ?????§??¬?´???°????????? */
    System.out.println(b + " " + bai);
    }
    }
}