import java.util.Scanner;
 class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int GCD[] = new int[100];
		int LCM[] = new int[100];
		int i = 0;
		while(sc.hasNext()){
			int a = sc.nextInt(), b =sc.nextInt();
			GCD[i] = GCD(a,b);
			LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i];
			i++;
		}
		for(int j = 0; j < i; j++){
			System.out.println(GCD[j]+" "+LCM[j]);
		}
		
	}
	
	public static int GCD(int a, int b){
		Scanner sc = new Scanner(System.in);
		int x ;
		if(a < b){
			x = a;
			a = b;
			b = x;
		}
		while(true){
			x = a%b;
			if(x == 0) break;
			a = b;
			b = x;
		}
		return b;
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int GCD[] = new int[100];
		int LCM[] = new int[100];
		int i = 0;
		while(sc.hasNext()){
			int a = sc.nextInt(), b =sc.nextInt();
			GCD[i] = GCD(a,b);
			LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i];
			i++;
		}
		for(int j = 0; j < i; j++){
			System.out.println(GCD[j]+" "+LCM[j]);
		}
		
	}
	
	public static int GCD(int a, int b){
		Scanner sc = new Scanner(System.in);
		int x ;
		if(a < b){
			x = a;
			a = b;
			b = x;
		}
		while(true){
			x = a%b;
			if(x == 0) break;
			a = b;
			b = x;
		}
		return b;
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int GCD[] = new int[100];
		int LCM[] = new int[100];
		int i = 0;
		while(sc.hasNext()){
			int a = sc.nextInt(), b =sc.nextInt();
			GCD[i] = GCD(a,b);
			LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i];
			i++;
		}
		for(int j = 0; j < i; j++){
			System.out.println(GCD[j]+" "+LCM[j]);
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		int GCD[] = new int[100];
		int LCM[] = new int[100];
		int i = 0;
		while(sc.hasNext()){
			int a = sc.nextInt(), b =sc.nextInt();
			GCD[i] = GCD(a,b);
			LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i];
			i++;
		}
		for(int j = 0; j < i; j++){
			System.out.println(GCD[j]+" "+LCM[j]);
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int GCD[] = new int[100]; GCD new int[100] 100 int LCM[] = new int[100]; LCM new int[100] 100 int i = 0; i 0 while(sc.hasNext()){
			int a = sc.nextInt(), b =sc.nextInt();
			GCD[i] = GCD(a,b);
			LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i];
			i++;
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt(), b =sc.nextInt();
			GCD[i] = GCD(a,b);
			LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i];
			i++;
		} int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b =sc.nextInt(); b sc.nextInt() sc.nextInt sc GCD[i] = GCD(a,b) GCD[i] GCD i GCD(a,b) GCD a b LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i] LCM[i] LCM i (a/GCD[i])*(b/GCD[i])*GCD[i] (a/GCD[i])*(b/GCD[i])*GCD[i] (a/GCD[i]) a GCD[i] GCD i (b/GCD[i]) b GCD[i] GCD i GCD[i] GCD i i++ i for(int j = 0; j < i; j++){
			System.out.println(GCD[j]+" "+LCM[j]);
		} int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
			System.out.println(GCD[j]+" "+LCM[j]);
		} {
			System.out.println(GCD[j]+" "+LCM[j]);
		} System.out.println(GCD[j]+" "+LCM[j]) System.out.println System.out System System.out GCD[j]+" "+LCM[j] GCD[j]+" "+LCM[j] GCD[j] GCD j " " LCM[j] LCM j String args[] args public static int GCD(int a, int b){
		Scanner sc = new Scanner(System.in);
		int x ;
		if(a < b){
			x = a;
			a = b;
			b = x;
		}
		while(true){
			x = a%b;
			if(x == 0) break;
			a = b;
			b = x;
		}
		return b;
	} GCD {
		Scanner sc = new Scanner(System.in);
		int x ;
		if(a < b){
			x = a;
			a = b;
			b = x;
		}
		while(true){
			x = a%b;
			if(x == 0) break;
			a = b;
			b = x;
		}
		return b;
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x ; x if(a < b){
			x = a;
			a = b;
			b = x;
		} a < b a b {
			x = a;
			a = b;
			b = x;
		} x = a x a a = b a b b = x b x while(true){
			x = a%b;
			if(x == 0) break;
			a = b;
			b = x;
		} true {
			x = a%b;
			if(x == 0) break;
			a = b;
			b = x;
		} x = a%b x a%b a b if(x == 0) break; x == 0 x 0 break; a = b a b b = x b x return b; b int a a int b b
import java.util.Scanner;
 class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int GCD[] = new int[100];
		int LCM[] = new int[100];
		int i = 0;
		while(sc.hasNext()){
			int a = sc.nextInt(), b =sc.nextInt();
			GCD[i] = GCD(a,b);
			LCM[i] = (a/GCD[i])*(b/GCD[i])*GCD[i];
			i++;
		}
		for(int j = 0; j < i; j++){
			System.out.println(GCD[j]+" "+LCM[j]);
		}
		
	}
	
	public static int GCD(int a, int b){
		Scanner sc = new Scanner(System.in);
		int x ;
		if(a < b){
			x = a;
			a = b;
			b = x;
		}
		while(true){
			x = a%b;
			if(x == 0) break;
			a = b;
			b = x;
		}
		return b;
	}
}