import java.util.Scanner;

public class Main {

	public static int gcd (int a, int b) {
		if (a == b) return a;
		if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		return gcd(b, a - b);
	}

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		}

	}

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

	public static int gcd (int a, int b) {
		if (a == b) return a;
		if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		return gcd(b, a - b);
	}

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		}

	}

} Main public static int gcd (int a, int b) {
		if (a == b) return a;
		if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		return gcd(b, a - b);
	} gcd {
		if (a == b) return a;
		if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		return gcd(b, a - b);
	} if (a == b) return a; a == b a b return a; a if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		} a < b a b {
			int temp = a;
			a = b;
			b = temp;
		} int temp = a; temp a a = b a b b = temp b temp return gcd(b, a - b); gcd(b, a - b) gcd b a - b a b int a a int b b public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		}

	} main {

		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int gcd = gcd(a, b); gcd gcd(a, b) gcd a b long lcm = a * (b / gcd); lcm a * (b / gcd) a (b / gcd) 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 class Main {

	public static int gcd (int a, int b) {
		if (a == b) return a;
		if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		return gcd(b, a - b);
	}

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		}

	}

} public class Main {

	public static int gcd (int a, int b) {
		if (a == b) return a;
		if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		return gcd(b, a - b);
	}

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static int gcd (int a, int b) {
		if (a == b) return a;
		if (a < b) {
			int temp = a;
			a = b;
			b = temp;
		}
		return gcd(b, a - b);
	}

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int gcd = gcd(a, b);
			long lcm = a * (b / gcd);
			System.out.println(gcd + " " + lcm);
		}

	}

}