import java.util.*;

class Main {
	public static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int g = gcd(a, b);
			System.out.println(g + " " + a / g * b);
		}
	}
} import java.util.*; util.* java class Main {
	public static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int g = gcd(a, b);
			System.out.println(g + " " + a / g * b);
		}
	}
} Main public static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	} gcd {
		return b == 0 ? a : gcd(b, a % b);
	} return b == 0 ? a : gcd(b, a % b); b == 0 ? a : gcd(b, a % b) b == 0 b 0 a gcd(b, a % b) gcd b a % b a b int a a int b b public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int g = gcd(a, b);
			System.out.println(g + " " + a / g * b);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int g = gcd(a, b);
			System.out.println(g + " " + a / g * b);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int g = gcd(a, b);
			System.out.println(g + " " + a / g * b);
		} scanner.hasNext() scanner.hasNext scanner {
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int g = gcd(a, b);
			System.out.println(g + " " + a / g * b);
		} int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int g = gcd(a, b); g gcd(a, b) gcd a b System.out.println(g + " " + a / g * b) System.out.println System.out System System.out g + " " + a / g * b g + " " + a / g * b g " " a / g * b a / g a g b String[] args args
import java.util.*;

class Main {
	public static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int g = gcd(a, b);
			System.out.println(g + " " + a / g * b);
		}
	}
}