import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		long[] ans=new long[2];
		while((str=br.readLine())!=null)
		{
			String[] aa=str.split(" ");
			long[] a=new long[aa.length];
			for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			}
			ans[0]=gcd(a[0],a[1]);
			ans[1]=(a[0]/ans[0])*a[1];

			System.out.printf("%d %d\n",ans[0],ans[1]);


		}
	}

	static long gcd(long a,long b)
	{
		if(b>0)
		{
			return gcd(b,a%b);
		}
		else
		{
			return a;
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		long[] ans=new long[2];
		while((str=br.readLine())!=null)
		{
			String[] aa=str.split(" ");
			long[] a=new long[aa.length];
			for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			}
			ans[0]=gcd(a[0],a[1]);
			ans[1]=(a[0]/ans[0])*a[1];

			System.out.printf("%d %d\n",ans[0],ans[1]);


		}
	}

	static long gcd(long a,long b)
	{
		if(b>0)
		{
			return gcd(b,a%b);
		}
		else
		{
			return a;
		}
	}
} Main public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		long[] ans=new long[2];
		while((str=br.readLine())!=null)
		{
			String[] aa=str.split(" ");
			long[] a=new long[aa.length];
			for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			}
			ans[0]=gcd(a[0],a[1]);
			ans[1]=(a[0]/ans[0])*a[1];

			System.out.printf("%d %d\n",ans[0],ans[1]);


		}
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		long[] ans=new long[2];
		while((str=br.readLine())!=null)
		{
			String[] aa=str.split(" ");
			long[] a=new long[aa.length];
			for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			}
			ans[0]=gcd(a[0],a[1]);
			ans[1]=(a[0]/ans[0])*a[1];

			System.out.printf("%d %d\n",ans[0],ans[1]);


		}
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str long[] ans=new long[2]; ans new long[2] 2 while((str=br.readLine())!=null)
		{
			String[] aa=str.split(" ");
			long[] a=new long[aa.length];
			for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			}
			ans[0]=gcd(a[0],a[1]);
			ans[1]=(a[0]/ans[0])*a[1];

			System.out.printf("%d %d\n",ans[0],ans[1]);


		} (str=br.readLine())!=null (str=br.readLine()) str br.readLine() br.readLine br null {
			String[] aa=str.split(" ");
			long[] a=new long[aa.length];
			for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			}
			ans[0]=gcd(a[0],a[1]);
			ans[1]=(a[0]/ans[0])*a[1];

			System.out.printf("%d %d\n",ans[0],ans[1]);


		} String[] aa=str.split(" "); aa str.split(" ") str.split str " " long[] a=new long[aa.length]; a new long[aa.length] aa.length aa aa.length for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			} int i=0; int i=0; i 0 i<aa.length i aa.length aa aa.length i++ i++ i {
				a[i]=Long.parseLong(aa[i]);
			} {
				a[i]=Long.parseLong(aa[i]);
			} a[i]=Long.parseLong(aa[i]) a[i] a i Long.parseLong(aa[i]) Long.parseLong Long aa[i] aa i ans[0]=gcd(a[0],a[1]) ans[0] ans 0 gcd(a[0],a[1]) gcd a[0] a 0 a[1] a 1 ans[1]=(a[0]/ans[0])*a[1] ans[1] ans 1 (a[0]/ans[0])*a[1] (a[0]/ans[0]) a[0] a 0 ans[0] ans 0 a[1] a 1 System.out.printf("%d %d\n",ans[0],ans[1]) System.out.printf System.out System System.out "%d %d\n" ans[0] ans 0 ans[1] ans 1 String[] args args static long gcd(long a,long b)
	{
		if(b>0)
		{
			return gcd(b,a%b);
		}
		else
		{
			return a;
		}
	} gcd {
		if(b>0)
		{
			return gcd(b,a%b);
		}
		else
		{
			return a;
		}
	} if(b>0)
		{
			return gcd(b,a%b);
		}
		else
		{
			return a;
		} b>0 b 0 {
			return gcd(b,a%b);
		} return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b {
			return a;
		} return a; a long a a long b b
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		long[] ans=new long[2];
		while((str=br.readLine())!=null)
		{
			String[] aa=str.split(" ");
			long[] a=new long[aa.length];
			for(int i=0;i<aa.length;i++)
			{
				a[i]=Long.parseLong(aa[i]);
			}
			ans[0]=gcd(a[0],a[1]);
			ans[1]=(a[0]/ans[0])*a[1];

			System.out.printf("%d %d\n",ans[0],ans[1]);


		}
	}

	static long gcd(long a,long b)
	{
		if(b>0)
		{
			return gcd(b,a%b);
		}
		else
		{
			return a;
		}
	}
}