import java.io.*;
class Main{

    public static void main(String[] args) throws IOException{
	int gcd,lcm;
	BufferedReader br=
	    new BufferedReader (new InputStreamReader(System.in));
	String buf;
	while(true){
	    if((buf=br.readLine())==null)break;
	    if(buf.length()==0)break;
	    String[] data=buf.split(" ");
	    int[] dat =new int[2];
	    for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    }
	    int x=dat[0],y=dat[1];
	    while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    }
	    lcm=x;
	    double d=(double)dat[0]*(double)dat[1];
	    d/=(double)lcm;
	    gcd=(int)d;
	    System.out.println(lcm+" "+gcd);
	}
    }
} import java.io.*; io.* java class Main{

    public static void main(String[] args) throws IOException{
	int gcd,lcm;
	BufferedReader br=
	    new BufferedReader (new InputStreamReader(System.in));
	String buf;
	while(true){
	    if((buf=br.readLine())==null)break;
	    if(buf.length()==0)break;
	    String[] data=buf.split(" ");
	    int[] dat =new int[2];
	    for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    }
	    int x=dat[0],y=dat[1];
	    while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    }
	    lcm=x;
	    double d=(double)dat[0]*(double)dat[1];
	    d/=(double)lcm;
	    gcd=(int)d;
	    System.out.println(lcm+" "+gcd);
	}
    }
} Main public static void main(String[] args) throws IOException{
	int gcd,lcm;
	BufferedReader br=
	    new BufferedReader (new InputStreamReader(System.in));
	String buf;
	while(true){
	    if((buf=br.readLine())==null)break;
	    if(buf.length()==0)break;
	    String[] data=buf.split(" ");
	    int[] dat =new int[2];
	    for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    }
	    int x=dat[0],y=dat[1];
	    while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    }
	    lcm=x;
	    double d=(double)dat[0]*(double)dat[1];
	    d/=(double)lcm;
	    gcd=(int)d;
	    System.out.println(lcm+" "+gcd);
	}
    } main {
	int gcd,lcm;
	BufferedReader br=
	    new BufferedReader (new InputStreamReader(System.in));
	String buf;
	while(true){
	    if((buf=br.readLine())==null)break;
	    if(buf.length()==0)break;
	    String[] data=buf.split(" ");
	    int[] dat =new int[2];
	    for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    }
	    int x=dat[0],y=dat[1];
	    while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    }
	    lcm=x;
	    double d=(double)dat[0]*(double)dat[1];
	    d/=(double)lcm;
	    gcd=(int)d;
	    System.out.println(lcm+" "+gcd);
	}
    } int gcd gcd lcm; lcm BufferedReader br=
	    new BufferedReader (new InputStreamReader(System.in)); br new BufferedReader (new InputStreamReader(System.in)) String buf; buf while(true){
	    if((buf=br.readLine())==null)break;
	    if(buf.length()==0)break;
	    String[] data=buf.split(" ");
	    int[] dat =new int[2];
	    for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    }
	    int x=dat[0],y=dat[1];
	    while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    }
	    lcm=x;
	    double d=(double)dat[0]*(double)dat[1];
	    d/=(double)lcm;
	    gcd=(int)d;
	    System.out.println(lcm+" "+gcd);
	} true {
	    if((buf=br.readLine())==null)break;
	    if(buf.length()==0)break;
	    String[] data=buf.split(" ");
	    int[] dat =new int[2];
	    for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    }
	    int x=dat[0],y=dat[1];
	    while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    }
	    lcm=x;
	    double d=(double)dat[0]*(double)dat[1];
	    d/=(double)lcm;
	    gcd=(int)d;
	    System.out.println(lcm+" "+gcd);
	} if((buf=br.readLine())==null)break; (buf=br.readLine())==null (buf=br.readLine()) buf br.readLine() br.readLine br null break; if(buf.length()==0)break; buf.length()==0 buf.length() buf.length buf 0 break; String[] data=buf.split(" "); data buf.split(" ") buf.split buf " " int[] dat =new int[2]; dat new int[2] 2 for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    } int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
		dat[i]=Integer.parseInt(data[i]);
	    } {
		dat[i]=Integer.parseInt(data[i]);
	    } dat[i]=Integer.parseInt(data[i]) dat[i] dat i Integer.parseInt(data[i]) Integer.parseInt Integer data[i] data i int x=dat[0] x dat[0] dat 0 y=dat[1]; y dat[1] dat 1 while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    } true {
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    } if(x==y)break; x==y x y break; if(x > y) x-=y;
		else y-=x; x > y x y x-=y x y y-=x y x lcm=x lcm x double d=(double)dat[0]*(double)dat[1]; d (double)dat[0]*(double)dat[1] (double)dat[0] dat 0 (double)dat[1] dat 1 d/=(double)lcm d (double)lcm gcd=(int)d gcd (int)d System.out.println(lcm+" "+gcd) System.out.println System.out System System.out lcm+" "+gcd lcm+" "+gcd lcm " " gcd String[] args args
import java.io.*;
class Main{

    public static void main(String[] args) throws IOException{
	int gcd,lcm;
	BufferedReader br=
	    new BufferedReader (new InputStreamReader(System.in));
	String buf;
	while(true){
	    if((buf=br.readLine())==null)break;
	    if(buf.length()==0)break;
	    String[] data=buf.split(" ");
	    int[] dat =new int[2];
	    for(int i=0;i<2;i++){
		dat[i]=Integer.parseInt(data[i]);
	    }
	    int x=dat[0],y=dat[1];
	    while(true){
		if(x==y)break;
		if(x > y) x-=y;
		else y-=x;
	    }
	    lcm=x;
	    double d=(double)dat[0]*(double)dat[1];
	    d/=(double)lcm;
	    gcd=(int)d;
	    System.out.println(lcm+" "+gcd);
	}
    }
}