import java.util.Scanner;
import java.util.Date;

class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a,b,c,m,n;
	while(sc.hasNext()){
	    a=sc.nextInt();
	    b=sc.nextInt();
	    m=a;n=b;
	    if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		}
	    while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		}
	   System.out.printf("%d %d\n",m,a/m*b);
	}
    }
} import java.util.Scanner; Scanner java.util import java.util.Date; Date java.util class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a,b,c,m,n;
	while(sc.hasNext()){
	    a=sc.nextInt();
	    b=sc.nextInt();
	    m=a;n=b;
	    if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		}
	    while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		}
	   System.out.printf("%d %d\n",m,a/m*b);
	}
    }
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a,b,c,m,n;
	while(sc.hasNext()){
	    a=sc.nextInt();
	    b=sc.nextInt();
	    m=a;n=b;
	    if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		}
	    while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		}
	   System.out.printf("%d %d\n",m,a/m*b);
	}
    } main {
	Scanner sc = new Scanner(System.in);
	int a,b,c,m,n;
	while(sc.hasNext()){
	    a=sc.nextInt();
	    b=sc.nextInt();
	    m=a;n=b;
	    if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		}
	    while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		}
	   System.out.printf("%d %d\n",m,a/m*b);
	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a a b b c c m m n; n while(sc.hasNext()){
	    a=sc.nextInt();
	    b=sc.nextInt();
	    m=a;n=b;
	    if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		}
	    while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		}
	   System.out.printf("%d %d\n",m,a/m*b);
	} sc.hasNext() sc.hasNext sc {
	    a=sc.nextInt();
	    b=sc.nextInt();
	    m=a;n=b;
	    if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		}
	    while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		}
	   System.out.printf("%d %d\n",m,a/m*b);
	} a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc m=a m a n=b n b if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		} m<n m n {
		    c=n;
		    n=m;
		    m=c;
		} c=n c n n=m n m m=c m c while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		} true {
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		} if(n==0)break; n==0 n 0 break; c=n c n n=m%n n m%n m n m=c m c System.out.printf("%d %d\n",m,a/m*b) System.out.printf System.out System System.out "%d %d\n" m a/m*b a/m a m b String[] args args
import java.util.Scanner;
import java.util.Date;

class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a,b,c,m,n;
	while(sc.hasNext()){
	    a=sc.nextInt();
	    b=sc.nextInt();
	    m=a;n=b;
	    if(m<n)
		{
		    c=n;
		    n=m;
		    m=c;
		}
	    while(true)
		{
		    if(n==0)break;
		    c=n;
		    n=m%n;
		    m=c;
		}
	   System.out.printf("%d %d\n",m,a/m*b);
	}
    }
}