import java.util.*;
public class Main 
{
	public static void main(String[] args) 
	{
		Scanner stdIn = new Scanner(System.in);
		while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		}
	}
	
	static long gcd(long a, long b)
	{
		if(b == 0)
		{
			return(a);
		}
		return(gcd(b, a % b));
	}
} import java.util.*; util.* java public class Main 
{
	public static void main(String[] args) 
	{
		Scanner stdIn = new Scanner(System.in);
		while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		}
	}
	
	static long gcd(long a, long b)
	{
		if(b == 0)
		{
			return(a);
		}
		return(gcd(b, a % b));
	}
} Main public static void main(String[] args) 
	{
		Scanner stdIn = new Scanner(System.in);
		while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		} stdIn.hasNext() stdIn.hasNext stdIn {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		} long a = stdIn.nextLong(); a stdIn.nextLong() stdIn.nextLong stdIn long b = stdIn.nextLong(); b stdIn.nextLong() stdIn.nextLong stdIn if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			} a < b a b {
				long temp = a;
				a = b;
				b = temp;
			} long temp = a; temp a a = b a b b = temp b temp long g = gcd(a, b); g gcd(a, b) gcd a b System.out.println(g + " " + (a * b / g)) System.out.println System.out System System.out g + " " + (a * b / g) g + " " + (a * b / g) g " " (a * b / g) a * b a b g String[] args args static long gcd(long a, long b)
	{
		if(b == 0)
		{
			return(a);
		}
		return(gcd(b, a % b));
	} gcd {
		if(b == 0)
		{
			return(a);
		}
		return(gcd(b, a % b));
	} if(b == 0)
		{
			return(a);
		} b == 0 b 0 {
			return(a);
		} return(a); (a) return(gcd(b, a % b)); (gcd(b, a % b)) gcd b a % b a b long a a long b b public class Main 
{
	public static void main(String[] args) 
	{
		Scanner stdIn = new Scanner(System.in);
		while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		}
	}
	
	static long gcd(long a, long b)
	{
		if(b == 0)
		{
			return(a);
		}
		return(gcd(b, a % b));
	}
} public class Main 
{
	public static void main(String[] args) 
	{
		Scanner stdIn = new Scanner(System.in);
		while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		}
	}
	
	static long gcd(long a, long b)
	{
		if(b == 0)
		{
			return(a);
		}
		return(gcd(b, a % b));
	}
} Main
import java.util.*;
public class Main 
{
	public static void main(String[] args) 
	{
		Scanner stdIn = new Scanner(System.in);
		while(stdIn.hasNext())
		{
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			if(a < b)
			{
				long temp = a;
				a = b;
				b = temp;
			}
			long g = gcd(a, b);
			System.out.println(g + " " + (a * b / g));
		}
	}
	
	static long gcd(long a, long b)
	{
		if(b == 0)
		{
			return(a);
		}
		return(gcd(b, a % b));
	}
}