import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        }
    }

    public static long gcd(long a, long b){
        long c = a % b;
        if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        }
    }
}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        }
    }

    public static long gcd(long a, long b){
        long c = a % b;
        if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        } sc.hasNext() sc.hasNext sc {
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        } long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long c = a - b; c a - b a b long gcd; gcd if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            } c < 0 c 0 {
                gcd = gcd(b, a);
            } gcd = gcd(b, a) gcd gcd(b, a) gcd b a {
                gcd = gcd(a, b);
            } gcd = gcd(a, b) gcd gcd(a, b) gcd a b long lcm = a * b / gcd; lcm a * b / gcd a * b 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 public static long gcd(long a, long b){
        long c = a % b;
        if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        }
    } gcd {
        long c = a % b;
        if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        }
    } long c = a % b; c a % b a b if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        } c == 0 c 0 {
            return b;
        } return b; b {
           return gcd(b, c);
        } return gcd(b, c); gcd(b, c) gcd b c long a a long b b public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        }
    }

    public static long gcd(long a, long b){
        long c = a % b;
        if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        }
    }

    public static long gcd(long a, long b){
        long c = a % b;
        if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            long a = sc.nextLong();
            long b = sc.nextLong();
            long c = a - b;
            long gcd;
            if (c < 0){
                gcd = gcd(b, a);
            } else {
                gcd = gcd(a, b);
            }
            long lcm = a * b / gcd;
         System.out.println(gcd + " " + lcm);
        }
    }

    public static long gcd(long a, long b){
        long c = a % b;
        if (c == 0 ){
            return b;
        } else {
           return gcd(b, c);
        }
    }
}

