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

public class Main
{
	public static void main(String[] arg) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String s;
		int gcd, lcm;
		while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		}
	}

	public static int gcd(int a, int b)
	{
		if(b==0) return a;
		else     return gcd(b, a%b);
	}

   	public static int lcm(int a, int b)
	{
		// a * b = gcd * lcm
		b /= gcd(a,b);
		return a * b;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main
{
	public static void main(String[] arg) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String s;
		int gcd, lcm;
		while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		}
	}

	public static int gcd(int a, int b)
	{
		if(b==0) return a;
		else     return gcd(b, a%b);
	}

   	public static int lcm(int a, int b)
	{
		// a * b = gcd * lcm
		b /= gcd(a,b);
		return a * b;
	}
} Main public static void main(String[] arg) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String s;
		int gcd, lcm;
		while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String s;
		int gcd, lcm;
		while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s; s int gcd gcd lcm; lcm while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		} (s=br.readLine())!=null (s=br.readLine()) s br.readLine() br.readLine br null {
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		} int a = Integer.parseInt(s.split(" ")[0]); a Integer.parseInt(s.split(" ")[0]) Integer.parseInt Integer s.split(" ")[0] s.split(" ") s.split s " " 0 int b = Integer.parseInt(s.split(" ")[1]); b Integer.parseInt(s.split(" ")[1]) Integer.parseInt Integer s.split(" ")[1] s.split(" ") s.split s " " 1 gcd = gcd(a,b) gcd gcd(a,b) gcd a b lcm = lcm(a,b) lcm lcm(a,b) lcm a b System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] arg arg public static int gcd(int a, int b)
	{
		if(b==0) return a;
		else     return gcd(b, a%b);
	} gcd {
		if(b==0) return a;
		else     return gcd(b, a%b);
	} if(b==0) return a;
		else     return gcd(b, a%b); b==0 b 0 return a; a return gcd(b, a%b); gcd(b, a%b) gcd b a%b a b int a a int b b public static int lcm(int a, int b)
	{
		// a * b = gcd * lcm
		b /= gcd(a,b);
		return a * b;
	} lcm {
		// a * b = gcd * lcm
		b /= gcd(a,b);
		return a * b;
	} b /= gcd(a,b) b gcd(a,b) gcd a b return a * b; a * b a b int a a int b b public class Main
{
	public static void main(String[] arg) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String s;
		int gcd, lcm;
		while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		}
	}

	public static int gcd(int a, int b)
	{
		if(b==0) return a;
		else     return gcd(b, a%b);
	}

   	public static int lcm(int a, int b)
	{
		// a * b = gcd * lcm
		b /= gcd(a,b);
		return a * b;
	}
} public class Main
{
	public static void main(String[] arg) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String s;
		int gcd, lcm;
		while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		}
	}

	public static int gcd(int a, int b)
	{
		if(b==0) return a;
		else     return gcd(b, a%b);
	}

   	public static int lcm(int a, int b)
	{
		// a * b = gcd * lcm
		b /= gcd(a,b);
		return a * b;
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main
{
	public static void main(String[] arg) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String s;
		int gcd, lcm;
		while((s=br.readLine())!=null)
		{
			int a = Integer.parseInt(s.split(" ")[0]);
			int b = Integer.parseInt(s.split(" ")[1]);

			gcd = gcd(a,b);
			lcm = lcm(a,b);
			System.out.println(gcd + " " + lcm);
		}
	}

	public static int gcd(int a, int b)
	{
		if(b==0) return a;
		else     return gcd(b, a%b);
	}

   	public static int lcm(int a, int b)
	{
		// a * b = gcd * lcm
		b /= gcd(a,b);
		return a * b;
	}
}