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

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		}
	}

	public static int getGCD(int a, int b) {

		int mod;
		int gt = a >= b ? a : b;
		int lt = a <= b ? a : b;

		do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0);

		return gt;
	}

	public static long getLCM(int a, int b, int gcm) {
		return (long) a * (long) b / gcm;
	}
} 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[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		}
	}

	public static int getGCD(int a, int b) {

		int mod;
		int gt = a >= b ? a : b;
		int lt = a <= b ? a : b;

		do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0);

		return gt;
	}

	public static long getLCM(int a, int b, int gcm) {
		return (long) a * (long) b / gcm;
	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		}
	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = ""; line "" while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		} int a a b b gcm; gcm a = Integer.parseInt(line.substring(0, line.indexOf(" "))) a Integer.parseInt(line.substring(0, line.indexOf(" "))) Integer.parseInt Integer line.substring(0, line.indexOf(" ")) line.substring line 0 line.indexOf(" ") line.indexOf line " " b = Integer.parseInt(line.substring(line.indexOf(" ") + 1)) b Integer.parseInt(line.substring(line.indexOf(" ") + 1)) Integer.parseInt Integer line.substring(line.indexOf(" ") + 1) line.substring line line.indexOf(" ") + 1 line.indexOf(" ") line.indexOf line " " 1 gcm = getGCD(a, b) gcm getGCD(a, b) getGCD a b System.out.println(gcm + " " + getLCM(a, b, gcm)) System.out.println System.out System System.out gcm + " " + getLCM(a, b, gcm) gcm + " " + getLCM(a, b, gcm) gcm " " getLCM(a, b, gcm) getLCM a b gcm String[] args args public static int getGCD(int a, int b) {

		int mod;
		int gt = a >= b ? a : b;
		int lt = a <= b ? a : b;

		do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0);

		return gt;
	} getGCD {

		int mod;
		int gt = a >= b ? a : b;
		int lt = a <= b ? a : b;

		do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0);

		return gt;
	} int mod; mod int gt = a >= b ? a : b; gt a >= b ? a : b a >= b a b a b int lt = a <= b ? a : b; lt a <= b ? a : b a <= b a b a b do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0); mod != 0 mod 0 {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} mod = gt % lt mod gt % lt gt lt gt = lt gt lt lt = mod lt mod return gt; gt int a a int b b public static long getLCM(int a, int b, int gcm) {
		return (long) a * (long) b / gcm;
	} getLCM {
		return (long) a * (long) b / gcm;
	} return (long) a * (long) b / gcm; (long) a * (long) b / gcm (long) a * (long) b (long) a (long) b gcm int a a int b b int gcm gcm public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		}
	}

	public static int getGCD(int a, int b) {

		int mod;
		int gt = a >= b ? a : b;
		int lt = a <= b ? a : b;

		do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0);

		return gt;
	}

	public static long getLCM(int a, int b, int gcm) {
		return (long) a * (long) b / gcm;
	}
} public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		}
	}

	public static int getGCD(int a, int b) {

		int mod;
		int gt = a >= b ? a : b;
		int lt = a <= b ? a : b;

		do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0);

		return gt;
	}

	public static long getLCM(int a, int b, int gcm) {
		return (long) a * (long) b / gcm;
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		while ((line = br.readLine()) != null) {
			int a, b, gcm;
			a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
			gcm = getGCD(a, b);
			System.out.println(gcm + " " + getLCM(a, b, gcm));
		}
	}

	public static int getGCD(int a, int b) {

		int mod;
		int gt = a >= b ? a : b;
		int lt = a <= b ? a : b;

		do {
			mod = gt % lt;
			gt = lt;
			lt = mod;
		} while (mod != 0);

		return gt;
	}

	public static long getLCM(int a, int b, int gcm) {
		return (long) a * (long) b / gcm;
	}
}