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

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

        while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        }
    }

    static int getGCD(int b , int s){
        return (b%s == 0) ? s : getGCD(s , b%s);
    }

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

        while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        }
    }

    static int getGCD(int b , int s){
        return (b%s == 0) ? s : getGCD(s , b%s);
    }

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

        while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line; line while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        } (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        } String[] input = line.split(" "); input line.split(" ") line.split line " " int a = Integer.parseInt(input[0]); a Integer.parseInt(input[0]) Integer.parseInt Integer input[0] input 0 int b = Integer.parseInt(input[1]); b Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 int x = getGCD(Math.max(a,b) , Math.min(a,b)); x getGCD(Math.max(a,b) , Math.min(a,b)) getGCD Math.max(a,b) Math.max Math a b Math.min(a,b) Math.min Math a b long y = (long)a*(long)b/x; y (long)a*(long)b/x (long)a*(long)b (long)a (long)b x System.out.println(x + " " + y) System.out.println System.out System System.out x + " " + y x + " " + y x " " y String[] args args static int getGCD(int b , int s){
        return (b%s == 0) ? s : getGCD(s , b%s);
    } getGCD {
        return (b%s == 0) ? s : getGCD(s , b%s);
    } return (b%s == 0) ? s : getGCD(s , b%s); (b%s == 0) ? s : getGCD(s , b%s) (b%s == 0) b%s b s 0 s getGCD(s , b%s) getGCD s b%s b s int b b int s s public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;

        while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        }
    }

    static int getGCD(int b , int s){
        return (b%s == 0) ? s : getGCD(s , b%s);
    }

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

        while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        }
    }

    static int getGCD(int b , int s){
        return (b%s == 0) ? s : getGCD(s , b%s);
    }

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

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

        while( (line = br.readLine()) != null){
            String[] input = line.split(" ");

            int a = Integer.parseInt(input[0]);
            int b = Integer.parseInt(input[1]);

            int x = getGCD(Math.max(a,b) , Math.min(a,b));
            long y = (long)a*(long)b/x;

            System.out.println(x + " " + y);
        }
    }

    static int getGCD(int b , int s){
        return (b%s == 0) ? s : getGCD(s , b%s);
    }

}