import java.util.Scanner;
class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			System.out.println(GCD(a, b) + " " + LCM(a, b));
		}
		in.close();
	}

	static long GCD(long a, long b) {//a>b
		if (a < b) {
			long temp = a;
			a = b;
			b = temp;
		}
		if (b == 0) {
			return a;
		} else {
			return GCD(b, a % b);
		}
	}

	static long LCM(long a, long b) {
		return a * b / GCD(a, b);
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			System.out.println(GCD(a, b) + " " + LCM(a, b));
		}
		in.close();
	}

	static long GCD(long a, long b) {//a>b
		if (a < b) {
			long temp = a;
			a = b;
			b = temp;
		}
		if (b == 0) {
			return a;
		} else {
			return GCD(b, a % b);
		}
	}

	static long LCM(long a, long b) {
		return a * b / GCD(a, b);
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			System.out.println(GCD(a, b) + " " + LCM(a, b));
		}
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			System.out.println(GCD(a, b) + " " + LCM(a, b));
		}
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			System.out.println(GCD(a, b) + " " + LCM(a, b));
		} in.hasNext() in.hasNext in {
			long a = in.nextLong();
			long b = in.nextLong();
			System.out.println(GCD(a, b) + " " + LCM(a, b));
		} long a = in.nextLong(); a in.nextLong() in.nextLong in long b = in.nextLong(); b in.nextLong() in.nextLong in 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 in.close() in.close in String[] args args static long GCD(long a, long b) {//a>b
		if (a < b) {
			long temp = a;
			a = b;
			b = temp;
		}
		if (b == 0) {
			return a;
		} else {
			return GCD(b, a % b);
		}
	} GCD {//a>b
		if (a < b) {
			long temp = a;
			a = b;
			b = temp;
		}
		if (b == 0) {
			return a;
		} else {
			return GCD(b, a % b);
		}
	} if (a < b) {
			long temp = a;
			a = b;
			b = temp;
		} a < b a b {
			long temp = a;
			a = b;
			b = temp;
		} long temp = a; temp a a = b a b b = temp b temp if (b == 0) {
			return a;
		} else {
			return GCD(b, a % b);
		} b == 0 b 0 {
			return a;
		} return a; a {
			return GCD(b, a % b);
		} return GCD(b, a % b); GCD(b, a % b) GCD b a % b a b long a a long b b static long LCM(long a, long b) {
		return a * b / GCD(a, b);
	} LCM {
		return a * b / GCD(a, b);
	} return a * b / GCD(a, b); a * b / GCD(a, b) a * b a b GCD(a, b) GCD a b long a a long b b
import java.util.Scanner;
class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			System.out.println(GCD(a, b) + " " + LCM(a, b));
		}
		in.close();
	}

	static long GCD(long a, long b) {//a>b
		if (a < b) {
			long temp = a;
			a = b;
			b = temp;
		}
		if (b == 0) {
			return a;
		} else {
			return GCD(b, a % b);
		}
	}

	static long LCM(long a, long b) {
		return a * b / GCD(a, b);
	}
}