

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{

	public static void main(String argv[]) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		String Array[] = new String[2];
		long a, b;
		long kouyaku = 0;
		while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		}
	}

	public static long gcd(long a, long b) {
		return b==0 ? a : gcd(b,a%b);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{

	public static void main(String argv[]) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		String Array[] = new String[2];
		long a, b;
		long kouyaku = 0;
		while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		}
	}

	public static long gcd(long a, long b) {
		return b==0 ? a : gcd(b,a%b);
	}

} Main public static void main(String argv[]) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		String Array[] = new String[2];
		long a, b;
		long kouyaku = 0;
		while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		String Array[] = new String[2];
		long a, b;
		long kouyaku = 0;
		while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String str; str String Array[] = new String[2]; Array new String[2] 2 long a a b; b long kouyaku = 0; kouyaku 0 while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		} Array = str.split(" ") Array str.split(" ") str.split str " " a = Long.parseLong(Array[0]) a Long.parseLong(Array[0]) Long.parseLong Long Array[0] Array 0 b = Long.parseLong(Array[1]) b Long.parseLong(Array[1]) Long.parseLong Long Array[1] Array 1 kouyaku = gcd(a, b) kouyaku gcd(a, b) gcd a b System.out.printf("%d %d\n", kouyaku, a * b / kouyaku) System.out.printf System.out System System.out "%d %d\n" kouyaku a * b / kouyaku a * b a b kouyaku String argv[] argv public static long gcd(long a, long b) {
		return b==0 ? a : gcd(b,a%b);
	} gcd {
		return b==0 ? a : gcd(b,a%b);
	} return b==0 ? a : gcd(b,a%b); b==0 ? a : gcd(b,a%b) b==0 b 0 a gcd(b,a%b) gcd b a%b a b long a a long b b public class Main{

	public static void main(String argv[]) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		String Array[] = new String[2];
		long a, b;
		long kouyaku = 0;
		while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		}
	}

	public static long gcd(long a, long b) {
		return b==0 ? a : gcd(b,a%b);
	}

} public class Main{

	public static void main(String argv[]) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		String Array[] = new String[2];
		long a, b;
		long kouyaku = 0;
		while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		}
	}

	public static long gcd(long a, long b) {
		return b==0 ? a : gcd(b,a%b);
	}

} Main


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{

	public static void main(String argv[]) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		String Array[] = new String[2];
		long a, b;
		long kouyaku = 0;
		while ((str = br.readLine()) != null) {
			Array = str.split(" ");
			a = Long.parseLong(Array[0]);
			b = Long.parseLong(Array[1]);
			kouyaku = gcd(a, b);
			System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);

		}
	}

	public static long gcd(long a, long b) {
		return b==0 ? a : gcd(b,a%b);
	}

}