import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        }
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        } catch(Exception ex){
            System.exit(0);
        } Exception ex {
            System.exit(0);
        } System.exit(0) System.exit System 0 {
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        } String st; st while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            } (st= br.readLine())!=null (st= br.readLine()) st br.readLine() br.readLine br null {
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            } String[] s = st.split(" ",0); s st.split(" ",0) st.split st " " 0 int a = Integer.parseInt(s[0]); a Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int b = Integer.parseInt(s[1]); b Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 int c = a; c a int d = b; d b while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                } b!=0 b 0 {
                    int k = b;
                    b = a%b;
                    a = k;
                } int k = b; k b b = a%b b a%b a b a = k a k System.out.println(a+" "+(c/a)*d) System.out.println System.out System System.out a+" "+(c/a)*d a+" "+(c/a)*d a " " (c/a)*d (c/a) c a d String[] args args public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        }
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            String st;
            while((st= br.readLine())!=null){
                String[] s = st.split(" ",0);
                int a = Integer.parseInt(s[0]);
                int b = Integer.parseInt(s[1]);
                int c = a;
                int d = b;
                while(b!=0){
                    int k = b;
                    b = a%b;
                    a = k;
                }
                System.out.println(a+" "+(c/a)*d);
                
            }
        }catch(Exception ex){
            System.exit(0);
        }
    }
}