import java.util.Scanner;


public class Main {

	public int calcGCD(int a_in, int b_in) {
		int a, b;
		if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; }

		int r = a % b;
		if (r == 0) { return b;
		} else { return calcGCD(b, r); }
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();

		while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public int calcGCD(int a_in, int b_in) {
		int a, b;
		if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; }

		int r = a % b;
		if (r == 0) { return b;
		} else { return calcGCD(b, r); }
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();

		while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		}

	}
} Main public int calcGCD(int a_in, int b_in) {
		int a, b;
		if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; }

		int r = a % b;
		if (r == 0) { return b;
		} else { return calcGCD(b, r); }
	} calcGCD {
		int a, b;
		if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; }

		int r = a % b;
		if (r == 0) { return b;
		} else { return calcGCD(b, r); }
	} int a a b; b if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; } a_in == b_in a_in b_in { return a_in;
		} return a_in; a_in if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; } a_in < b_in a_in b_in { a = b_in; b = a_in;
		} a = b_in a b_in b = a_in b a_in { a = a_in; b = b_in; } a = a_in a a_in b = b_in b b_in int r = a % b; r a % b a b if (r == 0) { return b;
		} else { return calcGCD(b, r); } r == 0 r 0 { return b;
		} return b; b { return calcGCD(b, r); } return calcGCD(b, r); calcGCD(b, r) calcGCD b r int a_in a_in int b_in b_in public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();

		while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		}

	} main {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();

		while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Main m = new Main(); m new Main() while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		} int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int gcd = m.calcGCD(a, b); gcd m.calcGCD(a, b) m.calcGCD m a b System.out.println(gcd+" "+(a/gcd*b)) System.out.println System.out System System.out gcd+" "+(a/gcd*b) gcd+" "+(a/gcd*b) gcd " " (a/gcd*b) a/gcd a gcd b String[] args args public class Main {

	public int calcGCD(int a_in, int b_in) {
		int a, b;
		if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; }

		int r = a % b;
		if (r == 0) { return b;
		} else { return calcGCD(b, r); }
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();

		while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		}

	}
} public class Main {

	public int calcGCD(int a_in, int b_in) {
		int a, b;
		if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; }

		int r = a % b;
		if (r == 0) { return b;
		} else { return calcGCD(b, r); }
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();

		while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		}

	}
} Main
import java.util.Scanner;


public class Main {

	public int calcGCD(int a_in, int b_in) {
		int a, b;
		if (a_in == b_in) { return a_in;
		} else if (a_in < b_in) { a = b_in; b = a_in;
		} else { a = a_in; b = b_in; }

		int r = a % b;
		if (r == 0) { return b;
		} else { return calcGCD(b, r); }
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();

		while (sc.hasNext()) {
			int a = sc.nextInt(), b = sc.nextInt();
			int gcd = m.calcGCD(a, b);
			System.out.println(gcd+" "+(a/gcd*b));
		}

	}
}