import java.io.*;
public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	private static long gcd(long a, long b) {
		if(b == 0) return a;
		return gcd(b, a % b);
	}
	private static long lcm(long a, long b) {
		return b * a / gcd(a, b);
	}
} import java.io.*; io.* java public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	private static long gcd(long a, long b) {
		if(b == 0) return a;
		return gcd(b, a % b);
	}
	private static long lcm(long a, long b) {
		return b * a / gcd(a, b);
	}
} Main public static void main(String args[]) throws IOException {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	} main {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	} BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); r new BufferedReader(new InputStreamReader(System.in)) while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		} true {
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		} String s = r.readLine(); s r.readLine() r.readLine r if(s == null) break; s == null s null break; int i = s.indexOf(" "); i s.indexOf(" ") s.indexOf s " " long a = Long.valueOf(s.substring(0, i)); a Long.valueOf(s.substring(0, i)) Long.valueOf Long s.substring(0, i) s.substring s 0 i long b = Long.valueOf(s.substring(i+1)); b Long.valueOf(s.substring(i+1)) Long.valueOf Long s.substring(i+1) s.substring s i+1 i 1 System.out.println(gcd(a, b) + " " + lcm(a, b)) System.out.println System.out System System.out gcd(a, b) + " " + lcm(a, b) gcd(a, b) + " " + lcm(a, b) gcd(a, b) gcd a b " " lcm(a, b) lcm a b String args[] args private static long gcd(long a, long b) {
		if(b == 0) return a;
		return gcd(b, a % b);
	} gcd {
		if(b == 0) return a;
		return gcd(b, a % b);
	} if(b == 0) return a; b == 0 b 0 return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b long a a long b b private static long lcm(long a, long b) {
		return b * a / gcd(a, b);
	} lcm {
		return b * a / gcd(a, b);
	} return b * a / gcd(a, b); b * a / gcd(a, b) b * a b a gcd(a, b) gcd a b long a a long b b public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	private static long gcd(long a, long b) {
		if(b == 0) return a;
		return gcd(b, a % b);
	}
	private static long lcm(long a, long b) {
		return b * a / gcd(a, b);
	}
} public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	private static long gcd(long a, long b) {
		if(b == 0) return a;
		return gcd(b, a % b);
	}
	private static long lcm(long a, long b) {
		return b * a / gcd(a, b);
	}
} Main
import java.io.*;
public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String s = r.readLine();
			if(s == null) break;
			int i = s.indexOf(" ");
			long a = Long.valueOf(s.substring(0, i));
			long b = Long.valueOf(s.substring(i+1));
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	private static long gcd(long a, long b) {
		if(b == 0) return a;
		return gcd(b, a % b);
	}
	private static long lcm(long a, long b) {
		return b * a / gcd(a, b);
	}
}