import java.util.Scanner;


public class Main {
    public static void main(String[] args){
    	Scanner input = new Scanner(System.in);
    	while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	}
    }
    
    public static int gcd(int x,int y){
    	int r;
        while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        }
        return y;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
    	Scanner input = new Scanner(System.in);
    	while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	}
    }
    
    public static int gcd(int x,int y){
    	int r;
        while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        }
        return y;
    }
} Main public static void main(String[] args){
    	Scanner input = new Scanner(System.in);
    	while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	}
    } main {
    	Scanner input = new Scanner(System.in);
    	while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	}
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	} input.hasNextInt() input.hasNextInt input {
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	} int a = input.nextInt(); a input.nextInt() input.nextInt input int b = input.nextInt(); b input.nextInt() input.nextInt input int gcd_num = gcd(a,b); gcd_num gcd(a,b) gcd a b System.out.println(gcd_num+" "+(a/gcd_num)*b) System.out.println System.out System System.out gcd_num+" "+(a/gcd_num)*b gcd_num+" "+(a/gcd_num)*b gcd_num " " (a/gcd_num)*b (a/gcd_num) a gcd_num b String[] args args public static int gcd(int x,int y){
    	int r;
        while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        }
        return y;
    } gcd {
    	int r;
        while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        }
        return y;
    } int r; r while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        } (r = x % y) != 0 (r = x % y) r x % y x y 0 {
            x = y;
            y = r;
        } x = y x y y = r y r return y; y int x x int y y public class Main {
    public static void main(String[] args){
    	Scanner input = new Scanner(System.in);
    	while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	}
    }
    
    public static int gcd(int x,int y){
    	int r;
        while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        }
        return y;
    }
} public class Main {
    public static void main(String[] args){
    	Scanner input = new Scanner(System.in);
    	while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	}
    }
    
    public static int gcd(int x,int y){
    	int r;
        while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        }
        return y;
    }
} Main
import java.util.Scanner;


public class Main {
    public static void main(String[] args){
    	Scanner input = new Scanner(System.in);
    	while(input.hasNextInt()){
    		int a = input.nextInt();
    		int b = input.nextInt();
    		int gcd_num = gcd(a,b);
    		System.out.println(gcd_num+" "+(a/gcd_num)*b);
    	}
    }
    
    public static int gcd(int x,int y){
    	int r;
        while((r = x % y) != 0) // yで割り切れるまでループ
        {
            x = y;
            y = r;
        }
        return y;
    }
}