import java.util.NoSuchElementException;
import java.util.Scanner;

public class Main {
	private static Scanner sc;
	static int getGCD(int a,int b){
		if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		}
		while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		}
		return a;
	}
	static int getLCM(int a,int b){
		return a/getGCD(a,b)*b;
	}
	public static void main(String[] args){
		sc=new Scanner(System.in);
		while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		}
	}

} import java.util.NoSuchElementException; NoSuchElementException java.util import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc;
	static int getGCD(int a,int b){
		if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		}
		while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		}
		return a;
	}
	static int getLCM(int a,int b){
		return a/getGCD(a,b)*b;
	}
	public static void main(String[] args){
		sc=new Scanner(System.in);
		while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		}
	}

} Main private static Scanner sc; sc static int getGCD(int a,int b){
		if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		}
		while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		}
		return a;
	} getGCD {
		if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		}
		while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		}
		return a;
	} if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		} b>a b a {
			int tmp=a;
			a=b;
			b=tmp;
		} int tmp=a; tmp a a=b a b b=tmp b tmp while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		} b!=0 b 0 {
			int tmp=b;
			b=a%b;
			a=tmp;
		} int tmp=b; tmp b b=a%b b a%b a b a=tmp a tmp return a; a int a a int b b static int getLCM(int a,int b){
		return a/getGCD(a,b)*b;
	} getLCM {
		return a/getGCD(a,b)*b;
	} return a/getGCD(a,b)*b; a/getGCD(a,b)*b a/getGCD(a,b) a getGCD(a,b) getGCD a b b int a a int b b public static void main(String[] args){
		sc=new Scanner(System.in);
		while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		}
	} main {
		sc=new Scanner(System.in);
		while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		}
	} sc=new Scanner(System.in) sc new Scanner(System.in) while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		} true {
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		} try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			} catch(NoSuchElementException e){
				break;
			} NoSuchElementException e {
				break;
			} break; {
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			} int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc System.out.print(getGCD(a,b)+" ") System.out.print System.out System System.out getGCD(a,b)+" " getGCD(a,b) getGCD a b " " System.out.println(getLCM(a,b)) System.out.println System.out System System.out getLCM(a,b) getLCM a b String[] args args public class Main {
	private static Scanner sc;
	static int getGCD(int a,int b){
		if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		}
		while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		}
		return a;
	}
	static int getLCM(int a,int b){
		return a/getGCD(a,b)*b;
	}
	public static void main(String[] args){
		sc=new Scanner(System.in);
		while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		}
	}

} public class Main {
	private static Scanner sc;
	static int getGCD(int a,int b){
		if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		}
		while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		}
		return a;
	}
	static int getLCM(int a,int b){
		return a/getGCD(a,b)*b;
	}
	public static void main(String[] args){
		sc=new Scanner(System.in);
		while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		}
	}

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

public class Main {
	private static Scanner sc;
	static int getGCD(int a,int b){
		if(b>a){
			int tmp=a;
			a=b;
			b=tmp;
		}
		while(b!=0){
			int tmp=b;
			b=a%b;
			a=tmp;
		}
		return a;
	}
	static int getLCM(int a,int b){
		return a/getGCD(a,b)*b;
	}
	public static void main(String[] args){
		sc=new Scanner(System.in);
		while(true){
			try{
				int a=sc.nextInt();
				int b=sc.nextInt();
				System.out.print(getGCD(a,b)+" ");
				System.out.println(getLCM(a,b));
			}catch(NoSuchElementException e){
				break;
			}
		}
	}

}