import java.io.*;
import java.util.*;
public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		}
	}
} Main public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		}
	} main {
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		}
	} BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String s; s while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		} (s=reader.readLine())!=null (s=reader.readLine()) s reader.readLine() reader.readLine reader null {
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		} String[] t=s.split(" "); t s.split(" ") s.split s " " int[] in=new int[2]; in new int[2] 2 for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]); int i=0; int i=0; i 0 i<2 i 2 i++ i++ i in[i]=Integer.parseInt(t[i]); in[i]=Integer.parseInt(t[i]) in[i] in i Integer.parseInt(t[i]) Integer.parseInt Integer t[i] t i int a=in[0]; a in[0] in 0 int b=in[1]; b in[1] in 1 if(a<b){int tmp=a;a=b;b=tmp;} a<b a b {int tmp=a;a=b;b=tmp;} int tmp=a; tmp a a=b a b b=tmp b tmp while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			} b!=0 b 0 {
				int tmp=a%b;a=b;b=tmp;
			} int tmp=a%b; tmp a%b a b a=b a b b=tmp b tmp System.out.println(a+" "+(long)in[0]*in[1]/a) System.out.println System.out System System.out a+" "+(long)in[0]*in[1]/a a+" "+(long)in[0]*in[1]/a a " " (long)in[0]*in[1]/a (long)in[0]*in[1] (long)in[0] in 0 in[1] in 1 a String[] args args public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		}
	}
} public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		}
	}
} Main
import java.io.*;
import java.util.*;
public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s;
		while((s=reader.readLine())!=null){
			String[] t=s.split(" ");
			int[] in=new int[2];
			for(int i=0;i<2;i++)
				in[i]=Integer.parseInt(t[i]);
			int a=in[0];
			int b=in[1];
			if(a<b){int tmp=a;a=b;b=tmp;}
			while(b!=0){
				int tmp=a%b;a=b;b=tmp;
			}
			System.out.println(a+" "+(long)in[0]*in[1]/a);
		}
	}
}