

import java.io.IOException;
import java.util.Scanner;


public class Main{

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		}
	}

	public static long divide(long a, long b) {
		long r;
		if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		}
		r = a % b;

		return r == 0 ? b : divide(b, r);
	}

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

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		}
	}

	public static long divide(long a, long b) {
		long r;
		if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		}
		r = a % b;

		return r == 0 ? b : divide(b, r);
	}

} Main public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		}
	} main {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		} scan.hasNext() scan.hasNext scan {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		} long a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long gcd = divide(a, b); gcd divide(a, b) divide a b long lcm = a * b / gcd; lcm a * b / gcd a * b a b gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] args args public static long divide(long a, long b) {
		long r;
		if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		}
		r = a % b;

		return r == 0 ? b : divide(b, r);
	} divide {
		long r;
		if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		}
		r = a % b;

		return r == 0 ? b : divide(b, r);
	} long r; r if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		} a < b a b {
			long temp = b;
			b = a;
			a = temp;
		} long temp = b; temp b b = a b a a = temp a temp r = a % b r a % b a b return r == 0 ? b : divide(b, r); r == 0 ? b : divide(b, r) r == 0 r 0 b divide(b, r) divide b r long a a long b b public class Main{

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		}
	}

	public static long divide(long a, long b) {
		long r;
		if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		}
		r = a % b;

		return r == 0 ? b : divide(b, r);
	}

} public class Main{

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		}
	}

	public static long divide(long a, long b) {
		long r;
		if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		}
		r = a % b;

		return r == 0 ? b : divide(b, r);
	}

} Main


import java.io.IOException;
import java.util.Scanner;


public class Main{

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long gcd = divide(a, b);

			long lcm = a * b / gcd;
			System.out.println(gcd + " " + lcm);

		}
	}

	public static long divide(long a, long b) {
		long r;
		if (a < b) {
			long temp = b;
			b = a;
			a = temp;
		}
		r = a % b;

		return r == 0 ? b : divide(b, r);
	}

}