import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);

		int a,b,t,gcd,lcm;
		
		while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);

		int a,b,t,gcd,lcm;
		
		while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		}
	}
} Main public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);

		int a,b,t,gcd,lcm;
		
		while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		}
	} main {
		Scanner cin = new Scanner(System.in);

		int a,b,t,gcd,lcm;
		
		while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		}
	} Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int a a b b t t gcd gcd lcm; lcm while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		} cin.hasNext() cin.hasNext cin {
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		} a=lcm=cin.nextInt() a lcm=cin.nextInt() lcm cin.nextInt() cin.nextInt cin b=gcd=cin.nextInt() b gcd=cin.nextInt() gcd cin.nextInt() cin.nextInt cin while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			} gcd!=0 gcd 0 {
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			} lcm=lcm%gcd lcm lcm%gcd lcm gcd t=lcm t lcm lcm=gcd lcm gcd gcd=t gcd t gcd = a/lcm*b gcd a/lcm*b a/lcm a lcm b System.out.println(lcm+" "+gcd) System.out.println System.out System System.out lcm+" "+gcd lcm+" "+gcd lcm " " gcd String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);

		int a,b,t,gcd,lcm;
		
		while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		}
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);

		int a,b,t,gcd,lcm;
		
		while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		}
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);

		int a,b,t,gcd,lcm;
		
		while(cin.hasNext())
		{
			a=lcm=cin.nextInt();
			b=gcd=cin.nextInt();
			
			while(gcd!=0)
			{
				lcm=lcm%gcd;
				t=lcm; lcm=gcd; gcd=t;	
			}
			gcd = a/lcm*b;

			System.out.println(lcm+" "+gcd);
		}
	}
}