import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(new BufferedInputStream(System.in));
		long a, b;
		while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		}
	}

	public static long gcd(long a, long b) {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		if (max % min == 0)
			return min;
		return gcd(min, max % min);
	}

	public static long lcm(long a, long b, long gcd) {
		return a * b / gcd;
	}
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(new BufferedInputStream(System.in));
		long a, b;
		while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		}
	}

	public static long gcd(long a, long b) {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		if (max % min == 0)
			return min;
		return gcd(min, max % min);
	}

	public static long lcm(long a, long b, long gcd) {
		return a * b / gcd;
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(new BufferedInputStream(System.in));
		long a, b;
		while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		}
	} main {
		Scanner scanner = new Scanner(new BufferedInputStream(System.in));
		long a, b;
		while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		}
	} Scanner scanner = new Scanner(new BufferedInputStream(System.in)); scanner new Scanner(new BufferedInputStream(System.in)) long a a b; b while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		} scanner.hasNext() scanner.hasNext scanner {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		} a = scanner.nextLong() a scanner.nextLong() scanner.nextLong scanner b = scanner.nextLong() b scanner.nextLong() scanner.nextLong scanner long gcd = gcd(a, b); gcd gcd(a, b) gcd a b System.out.println(gcd + " " + lcm(a, b, gcd)) System.out.println System.out System System.out gcd + " " + lcm(a, b, gcd) gcd + " " + lcm(a, b, gcd) gcd " " lcm(a, b, gcd) lcm a b gcd String[] args args public static long gcd(long a, long b) {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		if (max % min == 0)
			return min;
		return gcd(min, max % min);
	} gcd {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		if (max % min == 0)
			return min;
		return gcd(min, max % min);
	} long max = Math.max(a, b); max Math.max(a, b) Math.max Math a b long min = Math.min(a, b); min Math.min(a, b) Math.min Math a b if (max % min == 0)
			return min; max % min == 0 max % min max min 0 return min; min return gcd(min, max % min); gcd(min, max % min) gcd min max % min max min long a a long b b public static long lcm(long a, long b, long gcd) {
		return a * b / gcd;
	} lcm {
		return a * b / gcd;
	} return a * b / gcd; a * b / gcd a * b a b gcd long a a long b b long gcd gcd public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(new BufferedInputStream(System.in));
		long a, b;
		while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		}
	}

	public static long gcd(long a, long b) {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		if (max % min == 0)
			return min;
		return gcd(min, max % min);
	}

	public static long lcm(long a, long b, long gcd) {
		return a * b / gcd;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(new BufferedInputStream(System.in));
		long a, b;
		while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		}
	}

	public static long gcd(long a, long b) {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		if (max % min == 0)
			return min;
		return gcd(min, max % min);
	}

	public static long lcm(long a, long b, long gcd) {
		return a * b / gcd;
	}
} Main
import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(new BufferedInputStream(System.in));
		long a, b;
		while (scanner.hasNext()) {
			a = scanner.nextLong();
			b = scanner.nextLong();
			long gcd = gcd(a, b);
			System.out.println(gcd + " " + lcm(a, b, gcd));

		}
	}

	public static long gcd(long a, long b) {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		if (max % min == 0)
			return min;
		return gcd(min, max % min);
	}

	public static long lcm(long a, long b, long gcd) {
		return a * b / gcd;
	}
}