import java.util.Scanner;
 
class Main {
    public static void main(String[] args) {
        Scanner sc =  new Scanner(System.in);
        while(sc.hasNext()) {
            int  a = sc.nextInt();
            int b = sc.nextInt();
            int x,y;
            int temp = 0;
            if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            }
            while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            }
            System.out.println(a + " " + (x * (y / a)));
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc =  new Scanner(System.in);
        while(sc.hasNext()) {
            int  a = sc.nextInt();
            int b = sc.nextInt();
            int x,y;
            int temp = 0;
            if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            }
            while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            }
            System.out.println(a + " " + (x * (y / a)));
        }
    }
} Main public static void main(String[] args) {
        Scanner sc =  new Scanner(System.in);
        while(sc.hasNext()) {
            int  a = sc.nextInt();
            int b = sc.nextInt();
            int x,y;
            int temp = 0;
            if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            }
            while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            }
            System.out.println(a + " " + (x * (y / a)));
        }
    } main {
        Scanner sc =  new Scanner(System.in);
        while(sc.hasNext()) {
            int  a = sc.nextInt();
            int b = sc.nextInt();
            int x,y;
            int temp = 0;
            if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            }
            while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            }
            System.out.println(a + " " + (x * (y / a)));
        }
    } Scanner sc =  new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) {
            int  a = sc.nextInt();
            int b = sc.nextInt();
            int x,y;
            int temp = 0;
            if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            }
            while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            }
            System.out.println(a + " " + (x * (y / a)));
        } sc.hasNext() sc.hasNext sc {
            int  a = sc.nextInt();
            int b = sc.nextInt();
            int x,y;
            int temp = 0;
            if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            }
            while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            }
            System.out.println(a + " " + (x * (y / a)));
        } int  a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int x x y; y int temp = 0; temp 0 if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            } a < b a b {
                x = b;
                y = a;
            } x = b x b y = a y a {
                x = a;
                y = b;
            } x = a x a y = b y b while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            } b != 0 b 0 {
                temp = b;
                b = a % b;
                a = temp;
            } temp = b temp b b = a % b b a % b a b a = temp a temp System.out.println(a + " " + (x * (y / a))) System.out.println System.out System System.out a + " " + (x * (y / a)) a + " " + (x * (y / a)) a " " (x * (y / a)) x (y / a) y a String[] args args
import java.util.Scanner;
 
class Main {
    public static void main(String[] args) {
        Scanner sc =  new Scanner(System.in);
        while(sc.hasNext()) {
            int  a = sc.nextInt();
            int b = sc.nextInt();
            int x,y;
            int temp = 0;
            if (a < b) {
                x = b;
                y = a;
            } else {
                x = a;
                y = b;
            }
            while(b != 0) {
                temp = b;
                b = a % b;
                a = temp;
            }
            System.out.println(a + " " + (x * (y / a)));
        }
    }
}