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

public class Main {
	
	public static int gcd(int m, int n) {
		if(n == 0) return m;
		return gcd(n, m % n);
	}
	
	public static long lcm(int m, int n) {
		return ((long)m * n) / gcd(m, n);
	}
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<String> ans = new ArrayList<String>();
		
		while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		}
		for(String q : ans) {
			System.out.println(q);
		}
		
	}
	
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	
	public static int gcd(int m, int n) {
		if(n == 0) return m;
		return gcd(n, m % n);
	}
	
	public static long lcm(int m, int n) {
		return ((long)m * n) / gcd(m, n);
	}
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<String> ans = new ArrayList<String>();
		
		while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		}
		for(String q : ans) {
			System.out.println(q);
		}
		
	}
	
} Main public static int gcd(int m, int n) {
		if(n == 0) return m;
		return gcd(n, m % n);
	} gcd {
		if(n == 0) return m;
		return gcd(n, m % n);
	} if(n == 0) return m; n == 0 n 0 return m; m return gcd(n, m % n); gcd(n, m % n) gcd n m % n m n int m m int n n public static long lcm(int m, int n) {
		return ((long)m * n) / gcd(m, n);
	} lcm {
		return ((long)m * n) / gcd(m, n);
	} return ((long)m * n) / gcd(m, n); ((long)m * n) / gcd(m, n) ((long)m * n) (long)m n gcd(m, n) gcd m n int m m int n n public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<String> ans = new ArrayList<String>();
		
		while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		}
		for(String q : ans) {
			System.out.println(q);
		}
		
	} main {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<String> ans = new ArrayList<String>();
		
		while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		}
		for(String q : ans) {
			System.out.println(q);
		}
		
	} BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) ArrayList<String> ans = new ArrayList<String>(); ans new ArrayList<String>() while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		} true {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		} String s = br.readLine(); s br.readLine() br.readLine br if(s == null) break; s == null s null break; StringTokenizer st = new StringTokenizer(s," "); st new StringTokenizer(s," ") int a = Integer.parseInt(st.nextToken()); a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int b = Integer.parseInt(st.nextToken()); b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b))) ans.add ans String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)) String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)) String.valueOf(gcd(a,b)) String.valueOf String gcd(a,b) gcd a b " " String.valueOf(lcm(a,b)) String.valueOf String lcm(a,b) lcm a b for(String q : ans) {
			System.out.println(q);
		} String q ans {
			System.out.println(q);
		} {
			System.out.println(q);
		} System.out.println(q) System.out.println System.out System System.out q String[] args args public class Main {
	
	public static int gcd(int m, int n) {
		if(n == 0) return m;
		return gcd(n, m % n);
	}
	
	public static long lcm(int m, int n) {
		return ((long)m * n) / gcd(m, n);
	}
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<String> ans = new ArrayList<String>();
		
		while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		}
		for(String q : ans) {
			System.out.println(q);
		}
		
	}
	
} public class Main {
	
	public static int gcd(int m, int n) {
		if(n == 0) return m;
		return gcd(n, m % n);
	}
	
	public static long lcm(int m, int n) {
		return ((long)m * n) / gcd(m, n);
	}
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<String> ans = new ArrayList<String>();
		
		while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		}
		for(String q : ans) {
			System.out.println(q);
		}
		
	}
	
} Main
import java.io.*;
import java.util.*;

public class Main {
	
	public static int gcd(int m, int n) {
		if(n == 0) return m;
		return gcd(n, m % n);
	}
	
	public static long lcm(int m, int n) {
		return ((long)m * n) / gcd(m, n);
	}
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<String> ans = new ArrayList<String>();
		
		while (true) {
			
			String s = br.readLine();
			if(s == null) break;
			StringTokenizer st = new StringTokenizer(s," ");
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			ans.add(String.valueOf(gcd(a,b)) + " " + String.valueOf(lcm(a,b)));
			
		}
		for(String q : ans) {
			System.out.println(q);
		}
		
	}
	
}