import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

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

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		} sc.hasNext() sc.hasNext sc {
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		} int a a b b c c d d amari; amari a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = a c a d = b d b if(a<b){
				int x = a;
				a=b;
				b=x;
			} a<b a b {
				int x = a;
				a=b;
				b=x;
			} int x = a; x a a=b a b b=x b x while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			} a%b != 0 a%b a b 0 {
				amari = a % b;
				a = b;
				b = amari;
			} amari = a % b amari a % b a b a = b a b b = amari b amari int saidaikouyakusuu = b; saidaikouyakusuu b int saisyoukoubaisuu = c/saidaikouyakusuu*d; saisyoukoubaisuu c/saidaikouyakusuu*d c/saidaikouyakusuu c saidaikouyakusuu d System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu) System.out.println System.out System System.out saidaikouyakusuu+" "+saisyoukoubaisuu saidaikouyakusuu+" "+saisyoukoubaisuu saidaikouyakusuu " " saisyoukoubaisuu String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		}
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a,b,c,d,amari;
			a = sc.nextInt();
			b = sc.nextInt();
			c = a;
			d = b;
			if(a<b){
				int x = a;
				a=b;
				b=x;
			}	
			while(a%b != 0){
				amari = a % b;
				a = b;
				b = amari;
			}
			int saidaikouyakusuu = b;
		
			int saisyoukoubaisuu = c/saidaikouyakusuu*d;

			System.out.println(saidaikouyakusuu+" "+saisyoukoubaisuu);
		}
	}
}

