import java.util.Arrays;
import java.util.Scanner;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	}
	static int GCD(int a,int b){
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	}
	static int LCM(int a,int b){
		return a/GCD(a,b)*b;
	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	}
	static int GCD(int a,int b){
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	}
	static int LCM(int a,int b){
		return a/GCD(a,b)*b;
	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	} main {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	} Scanner cin=new Scanner(System.in); cin new Scanner(System.in) int a a b; b while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		} cin.hasNext() cin.hasNext cin {
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		} a=cin.nextInt() a cin.nextInt() cin.nextInt cin b=cin.nextInt() b cin.nextInt() cin.nextInt cin System.out.printf("%d %d\n",GCD(a,b),LCM(a,b)) System.out.printf System.out System System.out "%d %d\n" GCD(a,b) GCD a b LCM(a,b) LCM a b String[] args args static int GCD(int a,int b){
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	} GCD {
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	} if(a<b){
			int temp=a;a=b;b=temp;
		} a<b a b {
			int temp=a;a=b;b=temp;
		} int temp=a; temp a a=b a b b=temp b temp if(b==0) return a; b==0 b 0 return a; a return GCD(b,a%b); GCD(b,a%b) GCD b a%b a b int a a int b b static int LCM(int a,int b){
		return a/GCD(a,b)*b;
	} LCM {
		return a/GCD(a,b)*b;
	} return a/GCD(a,b)*b; a/GCD(a,b)*b a/GCD(a,b) a GCD(a,b) GCD a b b int a a int b b public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	}
	static int GCD(int a,int b){
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	}
	static int LCM(int a,int b){
		return a/GCD(a,b)*b;
	}

} public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	}
	static int GCD(int a,int b){
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	}
	static int LCM(int a,int b){
		return a/GCD(a,b)*b;
	}

} Main
import java.util.Arrays;
import java.util.Scanner;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d %d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	}
	static int GCD(int a,int b){
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	}
	static int LCM(int a,int b){
		return a/GCD(a,b)*b;
	}

}