import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while(true)
		{
			try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			}
		}
	}
} import java.util.Scanner; Scanner java.util class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while(true)
		{
			try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			}
		}
	}
} Main public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while(true)
		{
			try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		while(true)
		{
			try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(true)
		{
			try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			}
		} true {
			try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			}
		} try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			} catch (Exception e)
			{
				break;
			} Exception e {
				break;
			} break; {
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			} long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long n = a; n a long m = b; m b while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				} true {
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				} long k = m % n; k m % n m n if (k == 0) break; k == 0 k 0 break; m = n m n n = k n k System.out.print(Long.toString(n) + " ") System.out.print System.out System System.out Long.toString(n) + " " Long.toString(n) Long.toString Long n " " System.out.println(Long.toString(a * b / n)) System.out.println System.out System System.out Long.toString(a * b / n) Long.toString Long a * b / n a * b a b n String args[] args
import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while(true)
		{
			try
			{
				long a = sc.nextInt();
				long b = sc.nextInt();
				
				long n = a;
				long m = b;
				while (true)
				{
					long k = m % n;
					if (k == 0) break;
					m = n;
					n = k;
				}
				System.out.print(Long.toString(n) + " ");
				System.out.println(Long.toString(a * b / n));
			}
			catch (Exception e)
			{
				break;
			}
		}
	}
}