import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
  public static void main(String[] args) throws IOException{
    long num1,num2,kouyakusu=0;
    String str="";
    BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));

    while((str=buf.readLine()) != null){
      num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
      num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
      kouyakusu = kouyakusu(num1,num2);
      System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
    }
  }
  public static long kouyakusu(long num1,long num2){
    long x = (num1>num2)? num1 : num2;
    long y = (num1>num2)? num2 : num1;
    long tmp = 0;
    while((tmp = x%y)!=0){
      x = y;
      y = tmp;
    }
    return y;
  }



} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{
  public static void main(String[] args) throws IOException{
    long num1,num2,kouyakusu=0;
    String str="";
    BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));

    while((str=buf.readLine()) != null){
      num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
      num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
      kouyakusu = kouyakusu(num1,num2);
      System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
    }
  }
  public static long kouyakusu(long num1,long num2){
    long x = (num1>num2)? num1 : num2;
    long y = (num1>num2)? num2 : num1;
    long tmp = 0;
    while((tmp = x%y)!=0){
      x = y;
      y = tmp;
    }
    return y;
  }



} Main public static void main(String[] args) throws IOException{
    long num1,num2,kouyakusu=0;
    String str="";
    BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));

    while((str=buf.readLine()) != null){
      num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
      num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
      kouyakusu = kouyakusu(num1,num2);
      System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
    }
  } main {
    long num1,num2,kouyakusu=0;
    String str="";
    BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));

    while((str=buf.readLine()) != null){
      num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
      num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
      kouyakusu = kouyakusu(num1,num2);
      System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
    }
  } long num1 num1 num2 num2 kouyakusu=0; kouyakusu 0 String str=""; str "" BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); buf new BufferedReader(new InputStreamReader(System.in)) while((str=buf.readLine()) != null){
      num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
      num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
      kouyakusu = kouyakusu(num1,num2);
      System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
    } (str=buf.readLine()) != null (str=buf.readLine()) str buf.readLine() buf.readLine buf null {
      num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
      num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
      kouyakusu = kouyakusu(num1,num2);
      System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
    } num1 = Long.parseLong(str.substring(0, str.indexOf(" "))) num1 Long.parseLong(str.substring(0, str.indexOf(" "))) Long.parseLong Long str.substring(0, str.indexOf(" ")) str.substring str 0 str.indexOf(" ") str.indexOf str " " num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length())) num2 Long.parseLong(str.substring(str.indexOf(" ")+1, str.length())) Long.parseLong Long str.substring(str.indexOf(" ")+1, str.length()) str.substring str str.indexOf(" ")+1 str.indexOf(" ") str.indexOf str " " 1 str.length() str.length str kouyakusu = kouyakusu(num1,num2) kouyakusu kouyakusu(num1,num2) kouyakusu num1 num2 System.out.println(kouyakusu+" "+num1*num2/kouyakusu) System.out.println System.out System System.out kouyakusu+" "+num1*num2/kouyakusu kouyakusu+" "+num1*num2/kouyakusu kouyakusu " " num1*num2/kouyakusu num1*num2 num1 num2 kouyakusu String[] args args public static long kouyakusu(long num1,long num2){
    long x = (num1>num2)? num1 : num2;
    long y = (num1>num2)? num2 : num1;
    long tmp = 0;
    while((tmp = x%y)!=0){
      x = y;
      y = tmp;
    }
    return y;
  } kouyakusu {
    long x = (num1>num2)? num1 : num2;
    long y = (num1>num2)? num2 : num1;
    long tmp = 0;
    while((tmp = x%y)!=0){
      x = y;
      y = tmp;
    }
    return y;
  } long x = (num1>num2)? num1 : num2; x (num1>num2)? num1 : num2 (num1>num2) num1 num2 num1 num2 long y = (num1>num2)? num2 : num1; y (num1>num2)? num2 : num1 (num1>num2) num1 num2 num2 num1 long tmp = 0; tmp 0 while((tmp = x%y)!=0){
      x = y;
      y = tmp;
    } (tmp = x%y)!=0 (tmp = x%y) tmp x%y x y 0 {
      x = y;
      y = tmp;
    } x = y x y y = tmp y tmp return y; y long num1 num1 long num2 num2
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
  public static void main(String[] args) throws IOException{
    long num1,num2,kouyakusu=0;
    String str="";
    BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));

    while((str=buf.readLine()) != null){
      num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
      num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
      kouyakusu = kouyakusu(num1,num2);
      System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
    }
  }
  public static long kouyakusu(long num1,long num2){
    long x = (num1>num2)? num1 : num2;
    long y = (num1>num2)? num2 : num1;
    long tmp = 0;
    while((tmp = x%y)!=0){
      x = y;
      y = tmp;
    }
    return y;
  }



}