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 str;
		int a, b, GCD, LCM;

		while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		}
	}
	//??????????????????
	static int euclid(int u, int v) {
		int temp;
		if (u < v) {
			temp = u; u = v; v = temp;
		}
		if (v < 1) return -1;
		if (u % v == 0) return v;
		return euclid(v, u % v);
	}

} 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 str;
		int a, b, GCD, LCM;

		while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		}
	}
	//??????????????????
	static int euclid(int u, int v) {
		int temp;
		if (u < v) {
			temp = u; u = v; v = temp;
		}
		if (v < 1) return -1;
		if (u % v == 0) return v;
		return euclid(v, u % v);
	}

} Main public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a, b, GCD, LCM;

		while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		}
	} main {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a, b, GCD, LCM;

		while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str int a a b b GCD GCD LCM; LCM while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		} String[] num = str.split(" ", 0); num str.split(" ", 0) str.split str " " 0 a = Integer.parseInt(num[0]) a Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 b = Integer.parseInt(num[1]) b Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 GCD = euclid(a, b) GCD euclid(a, b) euclid a b LCM = a / GCD * b LCM a / GCD * b a / GCD a GCD b System.out.println(GCD + " " + LCM) System.out.println System.out System System.out GCD + " " + LCM GCD + " " + LCM GCD " " LCM String[] args args //??????????????????
	static int euclid(int u, int v) {
		int temp;
		if (u < v) {
			temp = u; u = v; v = temp;
		}
		if (v < 1) return -1;
		if (u % v == 0) return v;
		return euclid(v, u % v);
	} euclid {
		int temp;
		if (u < v) {
			temp = u; u = v; v = temp;
		}
		if (v < 1) return -1;
		if (u % v == 0) return v;
		return euclid(v, u % v);
	} int temp; temp if (u < v) {
			temp = u; u = v; v = temp;
		} u < v u v {
			temp = u; u = v; v = temp;
		} temp = u temp u u = v u v v = temp v temp if (v < 1) return -1; v < 1 v 1 return -1; -1 1 if (u % v == 0) return v; u % v == 0 u % v u v 0 return v; v return euclid(v, u % v); euclid(v, u % v) euclid v u % v u v int u u int v v public class Main {

	public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a, b, GCD, LCM;

		while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		}
	}
	//??????????????????
	static int euclid(int u, int v) {
		int temp;
		if (u < v) {
			temp = u; u = v; v = temp;
		}
		if (v < 1) return -1;
		if (u % v == 0) return v;
		return euclid(v, u % v);
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a, b, GCD, LCM;

		while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		}
	}
	//??????????????????
	static int euclid(int u, int v) {
		int temp;
		if (u < v) {
			temp = u; u = v; v = temp;
		}
		if (v < 1) return -1;
		if (u % v == 0) return v;
		return euclid(v, u % v);
	}

} 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 str;
		int a, b, GCD, LCM;

		while ((str = br.readLine()) != null) {
			String[] num = str.split(" ", 0);
			//?????????
			a = Integer.parseInt(num[0]);
			b = Integer.parseInt(num[1]);
			//???????¨????
			GCD = euclid(a, b);
			LCM = a / GCD * b;
			System.out.println(GCD + " " + LCM);
		}
	}
	//??????????????????
	static int euclid(int u, int v) {
		int temp;
		if (u < v) {
			temp = u; u = v; v = temp;
		}
		if (v < 1) return -1;
		if (u % v == 0) return v;
		return euclid(v, u % v);
	}

}