import java.util.Scanner;

public class Main {

	static Scanner sc = new java.util.Scanner(System.in);

	public static void main(String[] args) {
		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		}

	}

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

	static Scanner sc = new java.util.Scanner(System.in);

	public static void main(String[] args) {
		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		}

	}

} Main static Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) public static void main(String[] args) {
		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		}

	} main {
		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		}

	} while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		} sc.hasNext() sc.hasNext sc {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		} long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long x = a; x a long y = b; y b long max = y; max y while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			} x % y != 0 x % y x y 0 {
				max = x % y;
				x = y;
				y = max;
			} max = x % y max x % y x y x = y x y y = max y max long min = a * b / max; min a * b / max a * b a b max System.out.println(max + " " + min) System.out.println System.out System System.out max + " " + min max + " " + min max " " min String[] args args public class Main {

	static Scanner sc = new java.util.Scanner(System.in);

	public static void main(String[] args) {
		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		}

	}

} public class Main {

	static Scanner sc = new java.util.Scanner(System.in);

	public static void main(String[] args) {
		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		}

	}

} Main
import java.util.Scanner;

public class Main {

	static Scanner sc = new java.util.Scanner(System.in);

	public static void main(String[] args) {
		while (sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long x = a;
			long y = b;
			long max = y;
			while (x % y != 0) {
				max = x % y;
				x = y;
				y = max;
			}
			long min = a * b / max;
			System.out.println(max + " " + min);

		}

	}

}