import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Exception;
import java.lang.String;
import java.lang.System;

public class Main {
    public static void main(String[] a) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long num[] = new long[2];
        long gcd, lcm;
        String numStr[] = new String[2];
        String str;

        while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        }
    }

    // a, bの最大公約数を求める
    private static long getGCD(long a, long b) {
        if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
    }

    // a, bの最小公倍数を求める
    private static long getLCM(long a, long b) {
        return (a * b)/getGCD(a, b);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.Exception; Exception java.lang import java.lang.String; String java.lang import java.lang.System; System java.lang public class Main {
    public static void main(String[] a) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long num[] = new long[2];
        long gcd, lcm;
        String numStr[] = new String[2];
        String str;

        while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        }
    }

    // a, bの最大公約数を求める
    private static long getGCD(long a, long b) {
        if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
    }

    // a, bの最小公倍数を求める
    private static long getLCM(long a, long b) {
        return (a * b)/getGCD(a, b);
    }
} Main public static void main(String[] a) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long num[] = new long[2];
        long gcd, lcm;
        String numStr[] = new String[2];
        String str;

        while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        }
    } main {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long num[] = new long[2];
        long gcd, lcm;
        String numStr[] = new String[2];
        String str;

        while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        }
    } BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); r new BufferedReader(new InputStreamReader(System.in)) long num[] = new long[2]; num new long[2] 2 long gcd gcd lcm; lcm String numStr[] = new String[2]; numStr new String[2] 2 String str; str while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        } (str = r.readLine()) != null (str = r.readLine()) str r.readLine() r.readLine r null {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        } numStr = str.split(" ") numStr str.split(" ") str.split str " " for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            } int i = 0; int i = 0; i 0 i < numStr.length i numStr.length numStr numStr.length i++ i++ i {
                num[i] = Long.parseLong(numStr[i]);
            } {
                num[i] = Long.parseLong(numStr[i]);
            } num[i] = Long.parseLong(numStr[i]) num[i] num i Long.parseLong(numStr[i]) Long.parseLong Long numStr[i] numStr i gcd = getGCD(num[0], num[1]) gcd getGCD(num[0], num[1]) getGCD num[0] num 0 num[1] num 1 lcm = getLCM(num[0], num[1]) lcm getLCM(num[0], num[1]) getLCM num[0] num 0 num[1] num 1 System.out.printf("%d %d\n", gcd, lcm) System.out.printf System.out System System.out "%d %d\n" gcd lcm String[] a a // a, bの最大公約数を求める
    private static long getGCD(long a, long b) {
        if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
    } getGCD {
        if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
    } if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        } a > b a b {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        } long tmp; tmp tmp = a tmp a a = b a b b = tmp b tmp while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        } a != 0 a 0 {
            long tmp = a;
            a = b%a;
            b = tmp;
        } long tmp = a; tmp a a = b%a a b%a b a b = tmp b tmp return b; b long a a long b b // a, bの最小公倍数を求める
    private static long getLCM(long a, long b) {
        return (a * b)/getGCD(a, b);
    } getLCM {
        return (a * b)/getGCD(a, b);
    } return (a * b)/getGCD(a, b); (a * b)/getGCD(a, b) (a * b) a b getGCD(a, b) getGCD a b long a a long b b public class Main {
    public static void main(String[] a) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long num[] = new long[2];
        long gcd, lcm;
        String numStr[] = new String[2];
        String str;

        while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        }
    }

    // a, bの最大公約数を求める
    private static long getGCD(long a, long b) {
        if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
    }

    // a, bの最小公倍数を求める
    private static long getLCM(long a, long b) {
        return (a * b)/getGCD(a, b);
    }
} public class Main {
    public static void main(String[] a) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long num[] = new long[2];
        long gcd, lcm;
        String numStr[] = new String[2];
        String str;

        while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        }
    }

    // a, bの最大公約数を求める
    private static long getGCD(long a, long b) {
        if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
    }

    // a, bの最小公倍数を求める
    private static long getLCM(long a, long b) {
        return (a * b)/getGCD(a, b);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Exception;
import java.lang.String;
import java.lang.System;

public class Main {
    public static void main(String[] a) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long num[] = new long[2];
        long gcd, lcm;
        String numStr[] = new String[2];
        String str;

        while((str = r.readLine()) != null) {
            numStr = str.split(" ");
            for(int i = 0; i < numStr.length; i++) {
                num[i] = Long.parseLong(numStr[i]);
            }
            gcd = getGCD(num[0], num[1]);
            lcm = getLCM(num[0], num[1]);
            System.out.printf("%d %d\n", gcd, lcm);
        }
    }

    // a, bの最大公約数を求める
    private static long getGCD(long a, long b) {
        if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
    }

    // a, bの最小公倍数を求める
    private static long getLCM(long a, long b) {
        return (a * b)/getGCD(a, b);
    }
}