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