import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            };
        }
    }
    
    static int GCD(int a,int b){
        while(a!=b){
            if(a<b) b-=a;
            else a-=b;
        }return a;
    }
    
    static long LCM(int a,int b,int gcd){
        return ((long)a*b)/gcd;
    }
    
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            };
        }
    }
    
    static int GCD(int a,int b){
        while(a!=b){
            if(a<b) b-=a;
            else a-=b;
        }return a;
    }
    
    static long LCM(int a,int b,int gcd){
        return ((long)a*b)/gcd;
    }
    
} Main public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            };
        }
    } main {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            };
        }
    } BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
            try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            };
        } true {
            try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            };
        } try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            } catch(Exception e){
                System.exit(0);
            } Exception e {
                System.exit(0);
            } System.exit(0) System.exit System 0 {
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            } StringTokenizer st=new StringTokenizer(br.readLine()," "); st new StringTokenizer(br.readLine()," ") int a=Integer.parseInt(st.nextToken()); a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int b=Integer.parseInt(st.nextToken()); b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int gcd=GCD(a,b); gcd GCD(a,b) GCD a b long lcm=LCM(a,b,gcd); lcm LCM(a,b,gcd) LCM a b gcd System.out.println(gcd+" "+lcm) System.out.println System.out System System.out gcd+" "+lcm gcd+" "+lcm gcd " " lcm String[] args args static int GCD(int a,int b){
        while(a!=b){
            if(a<b) b-=a;
            else a-=b;
        }return a;
    } GCD {
        while(a!=b){
            if(a<b) b-=a;
            else a-=b;
        }return a;
    } while(a!=b){
            if(a<b) b-=a;
            else a-=b;
        } a!=b a b {
            if(a<b) b-=a;
            else a-=b;
        } if(a<b) b-=a;
            else a-=b; a<b a b b-=a b a a-=b a b return a; a int a a int b b static long LCM(int a,int b,int gcd){
        return ((long)a*b)/gcd;
    } LCM {
        return ((long)a*b)/gcd;
    } return ((long)a*b)/gcd; ((long)a*b)/gcd ((long)a*b) (long)a b gcd int a a int b b int gcd gcd
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            try{
            StringTokenizer st=new StringTokenizer(br.readLine()," ");
            int a=Integer.parseInt(st.nextToken());
            int b=Integer.parseInt(st.nextToken());
            int gcd=GCD(a,b);
            long lcm=LCM(a,b,gcd);
            System.out.println(gcd+" "+lcm);
            }catch(Exception e){
                System.exit(0);
            };
        }
    }
    
    static int GCD(int a,int b){
        while(a!=b){
            if(a<b) b-=a;
            else a-=b;
        }return a;
    }
    
    static long LCM(int a,int b,int gcd){
        return ((long)a*b)/gcd;
    }
    
}