import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		}
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		} stdIn.hasNext() stdIn.hasNext stdIn {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		} long a = stdIn.nextLong(); a stdIn.nextLong() stdIn.nextLong stdIn long b = stdIn.nextLong(); b stdIn.nextLong() stdIn.nextLong stdIn long c = 0; c 0 long d = a * b; d a * b a b if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			} a < b a b {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} c = a c a {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			} c = b c b System.out.println(c + " " + d/c) System.out.println System.out System System.out c + " " + d/c c + " " + d/c c " " d/c d c String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		while (stdIn.hasNext()) {
			long a = stdIn.nextLong();
			long b = stdIn.nextLong();
			long c = 0;
			long d = a * b;
			if (a < b) {
				outside: for (;;) {
					c = b % a;
					if (c == 0)
						break outside;
					b = a;
					a = c;

				}
				c = a;
			} else {
				outside: for (;;) {
					c = a % b;
					if (c == 0)
						break outside;
					a = b;
					b = c;

				}
				c = b;
			}
			System.out.println(c + " " + d/c);
		}
	}
}