import java.util.Scanner;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
			while(sc.hasNext())
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				long d = a * b; 
				long r;
					for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					}
			}
	}
} import java.util.Scanner; Scanner java.util class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
			while(sc.hasNext())
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				long d = a * b; 
				long r;
					for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					}
			}
	}
} Main public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
			while(sc.hasNext())
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				long d = a * b; 
				long r;
					for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					}
			}
	} main {
		Scanner sc = new Scanner(System.in);
			while(sc.hasNext())
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				long d = a * b; 
				long r;
					for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					}
			}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext())
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				long d = a * b; 
				long r;
					for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					}
			} sc.hasNext() sc.hasNext sc {
				long a = sc.nextInt();
				long b = sc.nextInt();
				long d = a * b; 
				long r;
					for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					}
			} long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long d = a * b; d a * b a b long r; r for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					} ; {
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					} {
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					} r = a % b r a % b a b if(r==0){System.out.println(b +" "+ d/b);break;} r==0 r 0 {System.out.println(b +" "+ d/b);break;} System.out.println(b +" "+ d/b) System.out.println System.out System System.out b +" "+ d/b b +" "+ d/b b " " d/b d b break; a = b % r a b % r b r if(a==0){System.out.println(r +" "+ d/r);break;} a==0 a 0 {System.out.println(r +" "+ d/r);break;} System.out.println(r +" "+ d/r) System.out.println System.out System System.out r +" "+ d/r r +" "+ d/r r " " d/r d r break; b = r % a b r % a r a if(b==0){System.out.println(a +" "+ d/a);break;} b==0 b 0 {System.out.println(a +" "+ d/a);break;} System.out.println(a +" "+ d/a) System.out.println System.out System System.out a +" "+ d/a a +" "+ d/a a " " d/a d a break; String[] args args
import java.util.Scanner;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
			while(sc.hasNext())
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				long d = a * b; 
				long r;
					for(;;)
					{
						r = a % b;if(r==0){System.out.println(b +" "+ d/b);break;}
						a = b % r;if(a==0){System.out.println(r +" "+ d/r);break;}
						b = r % a;if(b==0){System.out.println(a +" "+ d/a);break;}
					}
			}
	}
}