import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		}
		sc.close();
	}

	public static int GCD(int x, int y) {
		int tmp;
		while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		}
		return y;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		}
		sc.close();
	}

	public static int GCD(int x, int y) {
		int tmp;
		while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		}
		return y;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b)) System.out.println System.out System System.out GCD(a, b) + " " + 1l * a * b / GCD(a, b) GCD(a, b) + " " + 1l * a * b / GCD(a, b) GCD(a, b) GCD a b " " 1l * a * b / GCD(a, b) 1l * a * b 1l * a * b 1l a b GCD(a, b) GCD a b sc.close() sc.close sc String[] args args public static int GCD(int x, int y) {
		int tmp;
		while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		}
		return y;
	} GCD {
		int tmp;
		while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		}
		return y;
	} int tmp; tmp while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		} (tmp = x % y) != 0 (tmp = x % y) tmp x % y x y 0 {
			x = y;
			y = tmp;
		} x = y x y y = tmp y tmp return y; y int x x int y y public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		}
		sc.close();
	}

	public static int GCD(int x, int y) {
		int tmp;
		while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		}
		return y;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		}
		sc.close();
	}

	public static int GCD(int x, int y) {
		int tmp;
		while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		}
		return y;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(GCD(a, b) + " " + 1l * a * b / GCD(a, b));
		}
		sc.close();
	}

	public static int GCD(int x, int y) {
		int tmp;
		while ((tmp = x % y) != 0) {
			x = y;
			y = tmp;
		}
		return y;
	}
}