/* package whatever; // don't place package name! */

import java.util.Scanner;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner cin = new Scanner(System.in);
		
		while (cin.hasNext()){
			int a = cin.nextInt();
			int b = cin.nextInt();
			int gcd = GCD(a, b);
			int lcm = a / gcd * b;
			
			System.out.println(gcd + " " + lcm);
		}
	}
	
	private static int GCD(int a, int b)
	{
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	}
} import java.util.Scanner; Scanner java.util class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner cin = new Scanner(System.in);
		
		while (cin.hasNext()){
			int a = cin.nextInt();
			int b = cin.nextInt();
			int gcd = GCD(a, b);
			int lcm = a / gcd * b;
			
			System.out.println(gcd + " " + lcm);
		}
	}
	
	private static int GCD(int a, int b)
	{
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner cin = new Scanner(System.in);
		
		while (cin.hasNext()){
			int a = cin.nextInt();
			int b = cin.nextInt();
			int gcd = GCD(a, b);
			int lcm = a / gcd * b;
			
			System.out.println(gcd + " " + lcm);
		}
	} main {
		Scanner cin = new Scanner(System.in);
		
		while (cin.hasNext()){
			int a = cin.nextInt();
			int b = cin.nextInt();
			int gcd = GCD(a, b);
			int lcm = a / gcd * b;
			
			System.out.println(gcd + " " + lcm);
		}
	} Scanner cin = new Scanner(System.in); cin new Scanner(System.in) while (cin.hasNext()){
			int a = cin.nextInt();
			int b = cin.nextInt();
			int gcd = GCD(a, b);
			int lcm = a / gcd * b;
			
			System.out.println(gcd + " " + lcm);
		} cin.hasNext() cin.hasNext cin {
			int a = cin.nextInt();
			int b = cin.nextInt();
			int gcd = GCD(a, b);
			int lcm = a / gcd * b;
			
			System.out.println(gcd + " " + lcm);
		} int a = cin.nextInt(); a cin.nextInt() cin.nextInt cin int b = cin.nextInt(); b cin.nextInt() cin.nextInt cin int gcd = GCD(a, b); gcd GCD(a, b) GCD a b int lcm = a / gcd * b; lcm a / gcd * b a / gcd a gcd b System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] args args private static int GCD(int a, int b)
	{
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	} GCD {
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	} if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		} a % b != 0 a % b a b 0 {
			return (GCD(b, a % b));
		} return (GCD(b, a % b)); (GCD(b, a % b)) GCD b a % b a b {
			return (b);
		} return (b); (b) int a a int b b
/* package whatever; // don't place package name! */

import java.util.Scanner;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner cin = new Scanner(System.in);
		
		while (cin.hasNext()){
			int a = cin.nextInt();
			int b = cin.nextInt();
			int gcd = GCD(a, b);
			int lcm = a / gcd * b;
			
			System.out.println(gcd + " " + lcm);
		}
	}
	
	private static int GCD(int a, int b)
	{
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	}
}