import java.math.BigInteger;
import java.util.Scanner;

public class Main
{
	public static void main(String arg[])
	{
		Scanner sc = new Scanner(System.in); 
		while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		}
	}
	/*public static int  gcd(int x, int y) //ユークリッド互除法
	{
		int div=-1;
		while(true)
		{
			div = x%y;
			if(div==0)
				break;
			x=y;
			y=div;
		}	
		return y;
	}
	 */


} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String arg[])
	{
		Scanner sc = new Scanner(System.in); 
		while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		}
	}
	/*public static int  gcd(int x, int y) //ユークリッド互除法
	{
		int div=-1;
		while(true)
		{
			div = x%y;
			if(div==0)
				break;
			x=y;
			y=div;
		}	
		return y;
	}
	 */


} Main public static void main(String arg[])
	{
		Scanner sc = new Scanner(System.in); 
		while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		}
	} main {
		Scanner sc = new Scanner(System.in); 
		while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		} sc.hasNext() sc.hasNext sc {
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		} BigInteger x = sc.nextBigInteger(); x sc.nextBigInteger() sc.nextBigInteger sc BigInteger y = sc.nextBigInteger(); y sc.nextBigInteger() sc.nextBigInteger sc BigInteger gcd = x.gcd(y); gcd x.gcd(y) x.gcd x y BigInteger lcm = x.multiply(y).divide(gcd); lcm x.multiply(y).divide(gcd) x.multiply(y).divide x.multiply(y) x.multiply x y gcd System.out.print(gcd+" ") System.out.print System.out System System.out gcd+" " gcd " " System.out.println(lcm) System.out.println System.out System System.out lcm String arg[] arg public class Main
{
	public static void main(String arg[])
	{
		Scanner sc = new Scanner(System.in); 
		while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		}
	}
	/*public static int  gcd(int x, int y) //ユークリッド互除法
	{
		int div=-1;
		while(true)
		{
			div = x%y;
			if(div==0)
				break;
			x=y;
			y=div;
		}	
		return y;
	}
	 */


} public class Main
{
	public static void main(String arg[])
	{
		Scanner sc = new Scanner(System.in); 
		while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		}
	}
	/*public static int  gcd(int x, int y) //ユークリッド互除法
	{
		int div=-1;
		while(true)
		{
			div = x%y;
			if(div==0)
				break;
			x=y;
			y=div;
		}	
		return y;
	}
	 */


} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main
{
	public static void main(String arg[])
	{
		Scanner sc = new Scanner(System.in); 
		while(sc.hasNext())
		{
		
		BigInteger x = sc.nextBigInteger();
		BigInteger y = sc.nextBigInteger();

		BigInteger gcd = x.gcd(y);
		BigInteger lcm = x.multiply(y).divide(gcd);
		System.out.print(gcd+" ");
		System.out.println(lcm);
		}
	}
	/*public static int  gcd(int x, int y) //ユークリッド互除法
	{
		int div=-1;
		while(true)
		{
			div = x%y;
			if(div==0)
				break;
			x=y;
			y=div;
		}	
		return y;
	}
	 */


}