import java.util.Scanner;
 
public class Main
{
    public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	while(cin.hasNext())
	{
		long a = cin.nextInt();
		long b = cin.nextInt();
		
		long m = a;
		long n = b;
		long p = m;
		while(n != 0){p = n; n = m%n; m = p;}
		
		
		System.out.println(m+" "+a*b/m);
	}

    }
} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	while(cin.hasNext())
	{
		long a = cin.nextInt();
		long b = cin.nextInt();
		
		long m = a;
		long n = b;
		long p = m;
		while(n != 0){p = n; n = m%n; m = p;}
		
		
		System.out.println(m+" "+a*b/m);
	}

    }
} Main public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	while(cin.hasNext())
	{
		long a = cin.nextInt();
		long b = cin.nextInt();
		
		long m = a;
		long n = b;
		long p = m;
		while(n != 0){p = n; n = m%n; m = p;}
		
		
		System.out.println(m+" "+a*b/m);
	}

    } main {
	Scanner cin = new Scanner(System.in);
	while(cin.hasNext())
	{
		long a = cin.nextInt();
		long b = cin.nextInt();
		
		long m = a;
		long n = b;
		long p = m;
		while(n != 0){p = n; n = m%n; m = p;}
		
		
		System.out.println(m+" "+a*b/m);
	}

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

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

    }
} Main
import java.util.Scanner;
 
public class Main
{
    public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	while(cin.hasNext())
	{
		long a = cin.nextInt();
		long b = cin.nextInt();
		
		long m = a;
		long n = b;
		long p = m;
		while(n != 0){p = n; n = m%n; m = p;}
		
		
		System.out.println(m+" "+a*b/m);
	}

    }
}