

import java.util.Scanner;

public class Main {

	public void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		}
		sc.close();
	}

	// 最大公約数
	// ユークリッドの互除法
	public long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		else {
			return gcd(b, a % b);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

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

	public void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		}
		sc.close();
	}

	// 最大公約数
	// ユークリッドの互除法
	public long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		else {
			return gcd(b, a % b);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

} Main public void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		}
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		} sc.hasNext() sc.hasNext sc {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		} long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long c = gcd(a, b); c gcd(a, b) gcd a b long d = a * b / c; d a * b / c a * b a b c System.out.println(c + " " + d) System.out.println System.out System System.out c + " " + d c + " " + d c " " d sc.close() sc.close sc // 最大公約数
	// ユークリッドの互除法
	public long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		else {
			return gcd(b, a % b);
		}
	} gcd {
		if (b == 0) {
			return a;
		}
		else {
			return gcd(b, a % b);
		}
	} 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 public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {

	public void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		}
		sc.close();
	}

	// 最大公約数
	// ユークリッドの互除法
	public long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		else {
			return gcd(b, a % b);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

} public class Main {

	public void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		}
		sc.close();
	}

	// 最大公約数
	// ユークリッドの互除法
	public long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		else {
			return gcd(b, a % b);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

} Main


import java.util.Scanner;

public class Main {

	public void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();

			long c = gcd(a, b);

			long d = a * b / c;

			System.out.println(c + " " + d);
		}
		sc.close();
	}

	// 最大公約数
	// ユークリッドの互除法
	public long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		else {
			return gcd(b, a % b);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

}