import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		}
	}
	public static long gcd(long a, long b) {
		while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		}
		return a;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		}
	}
	public static long gcd(long a, long b) {
		while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		}
		return a;
	}
} Main public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		}
	} try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		} {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			} sc.hasNext() sc.hasNext sc {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			} long x = sc.nextLong(); x sc.nextLong() sc.nextLong sc long y = sc.nextLong(); y sc.nextLong() sc.nextLong sc long gcd = gcd(x, y); gcd gcd(x, y) gcd x y long lcm = (x / gcd) * y; lcm (x / gcd) * y (x / gcd) x gcd y System.out.printf("%s %s\n", gcd, lcm) System.out.printf System.out System System.out "%s %s\n" gcd lcm String[] args args public static long gcd(long a, long b) {
		while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		}
		return a;
	} gcd {
		while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		}
		return a;
	} while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		} a != b a b {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		} if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			} a > b a b {
				a = a - b;
			} a = a - b a a - b a b {
				b = b - a;
			} b = b - a b b - a b a return a; a long a a long b b public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		}
	}
	public static long gcd(long a, long b) {
		while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		}
		return a;
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		}
	}
	public static long gcd(long a, long b) {
		while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		}
		return a;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			while (sc.hasNext()) {
				long x = sc.nextLong();
				long y = sc.nextLong();

				long gcd = gcd(x, y);
				long lcm = (x / gcd) * y;
				System.out.printf("%s %s\n", gcd, lcm);
			}
		}
	}
	public static long gcd(long a, long b) {
		while (a != b) {
			if (a > b) {
				a = a - b;
			} else {
				b = b - a;
			}
		}
		return a;
	}
}