import java.util.Scanner;
class Main
{
    public static void main(String args[])
    {
Scanner scan=new Scanner(System.in);

	while(scan.hasNext())
	    {
	
	long a,b,a1,b1;
	a=scan.nextInt();
	b=scan.nextInt();
	a1=a;
	b1=b;
	if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    }
	while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    }
	System.out.println(b+" "+((a1*b1)/b));
	    }
    }
} import java.util.Scanner; Scanner java.util class Main
{
    public static void main(String args[])
    {
Scanner scan=new Scanner(System.in);

	while(scan.hasNext())
	    {
	
	long a,b,a1,b1;
	a=scan.nextInt();
	b=scan.nextInt();
	a1=a;
	b1=b;
	if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    }
	while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    }
	System.out.println(b+" "+((a1*b1)/b));
	    }
    }
} Main public static void main(String args[])
    {
Scanner scan=new Scanner(System.in);

	while(scan.hasNext())
	    {
	
	long a,b,a1,b1;
	a=scan.nextInt();
	b=scan.nextInt();
	a1=a;
	b1=b;
	if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    }
	while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    }
	System.out.println(b+" "+((a1*b1)/b));
	    }
    } main {
Scanner scan=new Scanner(System.in);

	while(scan.hasNext())
	    {
	
	long a,b,a1,b1;
	a=scan.nextInt();
	b=scan.nextInt();
	a1=a;
	b1=b;
	if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    }
	while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    }
	System.out.println(b+" "+((a1*b1)/b));
	    }
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext())
	    {
	
	long a,b,a1,b1;
	a=scan.nextInt();
	b=scan.nextInt();
	a1=a;
	b1=b;
	if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    }
	while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    }
	System.out.println(b+" "+((a1*b1)/b));
	    } scan.hasNext() scan.hasNext scan {
	
	long a,b,a1,b1;
	a=scan.nextInt();
	b=scan.nextInt();
	a1=a;
	b1=b;
	if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    }
	while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    }
	System.out.println(b+" "+((a1*b1)/b));
	    } long a a b b a1 a1 b1; b1 a=scan.nextInt() a scan.nextInt() scan.nextInt scan b=scan.nextInt() b scan.nextInt() scan.nextInt scan a1=a a1 a b1=b b1 b if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    } b>a b a {
		long tmp=b;
		b=a;
		a=tmp;
	    } long tmp=b; tmp b b=a b a a=tmp a tmp while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    } a%b!=0 a%b a b 0 {
		long tmp=b;
		b=a%b;
		a=tmp;
	    } long tmp=b; tmp b b=a%b b a%b a b a=tmp a tmp System.out.println(b+" "+((a1*b1)/b)) System.out.println System.out System System.out b+" "+((a1*b1)/b) b+" "+((a1*b1)/b) b " " ((a1*b1)/b) (a1*b1) a1 b1 b String args[] args
import java.util.Scanner;
class Main
{
    public static void main(String args[])
    {
Scanner scan=new Scanner(System.in);

	while(scan.hasNext())
	    {
	
	long a,b,a1,b1;
	a=scan.nextInt();
	b=scan.nextInt();
	a1=a;
	b1=b;
	if(b>a)
	    {
		long tmp=b;
		b=a;
		a=tmp;
	    }
	while(a%b!=0)
	    {
		long tmp=b;
		b=a%b;
		a=tmp;
	    }
	System.out.println(b+" "+((a1*b1)/b));
	    }
    }
}