import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static long numlong[];

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		}
	}

	public static long Euclid() {
		long x = numlong[0];
		long y = numlong[1];
		while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		}
		return x;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static long numlong[];

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		}
	}

	public static long Euclid() {
		long x = numlong[0];
		long y = numlong[1];
		while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		}
		return x;
	}
} Main public static long numlong[]; numlong public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		} str != null str null {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		} String numstr[] = str.split(" ", 0); numstr str.split(" ", 0) str.split str " " 0 numlong = new long[2] numlong new long[2] 2 numlong[0] = Long.parseLong(numstr[0]) numlong[0] numlong 0 Long.parseLong(numstr[0]) Long.parseLong Long numstr[0] numstr 0 numlong[1] = Long.parseLong(numstr[1]) numlong[1] numlong 1 Long.parseLong(numstr[1]) Long.parseLong Long numstr[1] numstr 1 long gcm = Euclid(); gcm Euclid() Euclid long lcm = numlong[0] * numlong[1] / gcm; lcm numlong[0] * numlong[1] / gcm numlong[0] * numlong[1] numlong[0] numlong 0 numlong[1] numlong 1 gcm System.out.println(gcm + " " + lcm) System.out.println System.out System System.out gcm + " " + lcm gcm + " " + lcm gcm " " lcm str = br.readLine() str br.readLine() br.readLine br String[] args args public static long Euclid() {
		long x = numlong[0];
		long y = numlong[1];
		while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		}
		return x;
	} Euclid {
		long x = numlong[0];
		long y = numlong[1];
		while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		}
		return x;
	} long x = numlong[0]; x numlong[0] numlong 0 long y = numlong[1]; y numlong[1] numlong 1 while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		} x != y x y {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		} if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			} x < y x y {
				y = y - x;
			} y = y - x y y - x y x {
				x = x - y;
			} x = x - y x x - y x y return x; x public class Main {
	public static long numlong[];

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		}
	}

	public static long Euclid() {
		long x = numlong[0];
		long y = numlong[1];
		while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		}
		return x;
	}
} public class Main {
	public static long numlong[];

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		}
	}

	public static long Euclid() {
		long x = numlong[0];
		long y = numlong[1];
		while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		}
		return x;
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static long numlong[];

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		while (str != null) {
			String numstr[] = str.split(" ", 0);
			numlong = new long[2];
			numlong[0] = Long.parseLong(numstr[0]);
			numlong[1] = Long.parseLong(numstr[1]);
			long gcm = Euclid();
			long lcm = numlong[0] * numlong[1] / gcm;
			System.out.println(gcm + " " + lcm);
			str = br.readLine();
		}
	}

	public static long Euclid() {
		long x = numlong[0];
		long y = numlong[1];
		while (x != y) {
			if (x < y) {
				y = y - x;
			} else {
				x = x - y;
			}
		}
		return x;
	}
}