import java.io.*;

class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;

        while((str= br.readLine()) != null){

            //????¨??????\??????????????????int????????????
            String[] str2 = str.split(" ");
            int a = Integer.parseInt(str2[0]);
            int b = Integer.parseInt(str2[1]);
            int a2 = a;
            int b2 = b;

            //???????????????????????????????????§gcd????±???????
            while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            }
            int gcd = b2;

            // "gcd(a,b) x lcm(a,b) = ab" ?????¬???????????£???????°???¬?????°????±???????  
            long lcm = (long) a*b / gcd;

            System.out.println(gcd +" "+ lcm);

        }
    }
} import java.io.*; io.* java class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;

        while((str= br.readLine()) != null){

            //????¨??????\??????????????????int????????????
            String[] str2 = str.split(" ");
            int a = Integer.parseInt(str2[0]);
            int b = Integer.parseInt(str2[1]);
            int a2 = a;
            int b2 = b;

            //???????????????????????????????????§gcd????±???????
            while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            }
            int gcd = b2;

            // "gcd(a,b) x lcm(a,b) = ab" ?????¬???????????£???????°???¬?????°????±???????  
            long lcm = (long) a*b / gcd;

            System.out.println(gcd +" "+ lcm);

        }
    }
} Main public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;

        while((str= br.readLine()) != null){

            //????¨??????\??????????????????int????????????
            String[] str2 = str.split(" ");
            int a = Integer.parseInt(str2[0]);
            int b = Integer.parseInt(str2[1]);
            int a2 = a;
            int b2 = b;

            //???????????????????????????????????§gcd????±???????
            while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            }
            int gcd = b2;

            // "gcd(a,b) x lcm(a,b) = ab" ?????¬???????????£???????°???¬?????°????±???????  
            long lcm = (long) a*b / gcd;

            System.out.println(gcd +" "+ lcm);

        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;

        while((str= br.readLine()) != null){

            //????¨??????\??????????????????int????????????
            String[] str2 = str.split(" ");
            int a = Integer.parseInt(str2[0]);
            int b = Integer.parseInt(str2[1]);
            int a2 = a;
            int b2 = b;

            //???????????????????????????????????§gcd????±???????
            while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            }
            int gcd = b2;

            // "gcd(a,b) x lcm(a,b) = ab" ?????¬???????????£???????°???¬?????°????±???????  
            long lcm = (long) a*b / gcd;

            System.out.println(gcd +" "+ lcm);

        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str while((str= br.readLine()) != null){

            //????¨??????\??????????????????int????????????
            String[] str2 = str.split(" ");
            int a = Integer.parseInt(str2[0]);
            int b = Integer.parseInt(str2[1]);
            int a2 = a;
            int b2 = b;

            //???????????????????????????????????§gcd????±???????
            while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            }
            int gcd = b2;

            // "gcd(a,b) x lcm(a,b) = ab" ?????¬???????????£???????°???¬?????°????±???????  
            long lcm = (long) a*b / gcd;

            System.out.println(gcd +" "+ lcm);

        } (str= br.readLine()) != null (str= br.readLine()) str br.readLine() br.readLine br null {

            //????¨??????\??????????????????int????????????
            String[] str2 = str.split(" ");
            int a = Integer.parseInt(str2[0]);
            int b = Integer.parseInt(str2[1]);
            int a2 = a;
            int b2 = b;

            //???????????????????????????????????§gcd????±???????
            while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            }
            int gcd = b2;

            // "gcd(a,b) x lcm(a,b) = ab" ?????¬???????????£???????°???¬?????°????±???????  
            long lcm = (long) a*b / gcd;

            System.out.println(gcd +" "+ lcm);

        } String[] str2 = str.split(" "); str2 str.split(" ") str.split str " " int a = Integer.parseInt(str2[0]); a Integer.parseInt(str2[0]) Integer.parseInt Integer str2[0] str2 0 int b = Integer.parseInt(str2[1]); b Integer.parseInt(str2[1]) Integer.parseInt Integer str2[1] str2 1 int a2 = a; a2 a int b2 = b; b2 b while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            } a2 % b2 != 0 a2 % b2 a2 b2 0 {
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            } int tmp = b2; tmp b2 b2 = a2 % b2 b2 a2 % b2 a2 b2 a2 = tmp a2 tmp int gcd = b2; gcd b2 long lcm = (long) a*b / gcd; lcm (long) a*b / gcd (long) a*b (long) 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
import java.io.*;

class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;

        while((str= br.readLine()) != null){

            //????¨??????\??????????????????int????????????
            String[] str2 = str.split(" ");
            int a = Integer.parseInt(str2[0]);
            int b = Integer.parseInt(str2[1]);
            int a2 = a;
            int b2 = b;

            //???????????????????????????????????§gcd????±???????
            while(a2 % b2 != 0){
                int tmp = b2;
                b2 = a2 % b2;
                a2 = tmp;
            }
            int gcd = b2;

            // "gcd(a,b) x lcm(a,b) = ab" ?????¬???????????£???????°???¬?????°????±???????  
            long lcm = (long) a*b / gcd;

            System.out.println(gcd +" "+ lcm);

        }
    }
}