import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s=" ";
		StringTokenizer st;
		int a,b,gcd,lcm,t,m,n;
		try {
			for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception err) {
			System.exit(0);
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s=" ";
		StringTokenizer st;
		int a,b,gcd,lcm,t,m,n;
		try {
			for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception err) {
			System.exit(0);
		}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s=" ";
		StringTokenizer st;
		int a,b,gcd,lcm,t,m,n;
		try {
			for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception err) {
			System.exit(0);
		}
	} main {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s=" ";
		StringTokenizer st;
		int a,b,gcd,lcm,t,m,n;
		try {
			for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception err) {
			System.exit(0);
		}
	} BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); r new BufferedReader(new InputStreamReader(System.in)) String s=" "; s " " StringTokenizer st; st int a a b b gcd gcd lcm lcm t t m m n; n try {
			for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception err) {
			System.exit(0);
		} catch (Exception err) {
			System.exit(0);
		} Exception err {
			System.exit(0);
		} System.exit(0) System.exit System 0 {
			for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			}
		} for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			} ; s!=null s null {
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			} {
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			} s = r.readLine() s r.readLine() r.readLine r st = new StringTokenizer(s," ") st new StringTokenizer(s," ") a = Integer.parseInt(st.nextToken().toString()) a Integer.parseInt(st.nextToken().toString()) Integer.parseInt Integer st.nextToken().toString() st.nextToken().toString st.nextToken() st.nextToken st b = Integer.parseInt(st.nextToken().toString()) b Integer.parseInt(st.nextToken().toString()) Integer.parseInt Integer st.nextToken().toString() st.nextToken().toString st.nextToken() st.nextToken st if(b>a){
					t=b; b=a; a=t;
				} b>a b a {
					t=b; b=a; a=t;
				} t=b t b b=a b a a=t a t m=a m a n=b n b while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				} true {
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				} if(n==0){
						gcd=m;
						break;
					} n==0 n 0 {
						gcd=m;
						break;
					} gcd=m gcd m break; t=n t n n=m%n n m%n m n m=t m t lcm=(a/gcd)*b lcm (a/gcd)*b (a/gcd) a gcd b System.out.println(gcd+" "+lcm) System.out.println System.out System System.out gcd+" "+lcm gcd+" "+lcm gcd " " lcm String[] args args
import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s=" ";
		StringTokenizer st;
		int a,b,gcd,lcm,t,m,n;
		try {
			for(;s!=null;){
				s = r.readLine();
				st = new StringTokenizer(s," ");
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				if(b>a){
					t=b; b=a; a=t;
				}
				m=a;n=b;
				while(true){
					if(n==0){
						gcd=m;
						break;
					}
					t=n;
					n=m%n;
					m=t;
				}
				lcm=(a/gcd)*b;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception err) {
			System.exit(0);
		}
	}
}