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

public class Main {

	/**
	 * AOJ 0005 GCD and LCM
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		String input = bufferedReader.readLine();
		String[] twoStr;
		while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		}
	}

	/**
	 * String????????????int?????????????????????????????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getintArray(String[] strArray) {
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		Arrays.sort(intArray);
		return intArray;
	}

	private static int getGCD(int[] twoIntOrg) {
		int tmp, diff;
		int[] twoInt = { twoIntOrg[0], twoIntOrg[1] };
		while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		}
		return twoInt[0];
	}

	private static int getLCM(int[] twoInt, int gcd) {
		return twoInt[0] / gcd * twoInt[1];
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

	/**
	 * AOJ 0005 GCD and LCM
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		String input = bufferedReader.readLine();
		String[] twoStr;
		while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		}
	}

	/**
	 * String????????????int?????????????????????????????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getintArray(String[] strArray) {
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		Arrays.sort(intArray);
		return intArray;
	}

	private static int getGCD(int[] twoIntOrg) {
		int tmp, diff;
		int[] twoInt = { twoIntOrg[0], twoIntOrg[1] };
		while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		}
		return twoInt[0];
	}

	private static int getLCM(int[] twoInt, int gcd) {
		return twoInt[0] / gcd * twoInt[1];
	}
} Main /**
	 * AOJ 0005 GCD and LCM
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		String input = bufferedReader.readLine();
		String[] twoStr;
		while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		}
	} main {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		String input = bufferedReader.readLine();
		String[] twoStr;
		while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		}
	} BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in)); bufferedReader new BufferedReader(
				new InputStreamReader(System.in)) String input = bufferedReader.readLine(); input bufferedReader.readLine() bufferedReader.readLine bufferedReader String[] twoStr; twoStr while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		} input != null input null {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		} twoStr = input.split("\\s") twoStr input.split("\\s") input.split input "\\s" int[] twoInt = getintArray(twoStr); twoInt getintArray(twoStr) getintArray twoStr int gcd = getGCD(twoInt); gcd getGCD(twoInt) getGCD twoInt int lcm = getLCM(twoInt, gcd); lcm getLCM(twoInt, gcd) getLCM twoInt gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm input = bufferedReader.readLine() input bufferedReader.readLine() bufferedReader.readLine bufferedReader String[] args args /**
	 * String????????????int?????????????????????????????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getintArray(String[] strArray) {
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		Arrays.sort(intArray);
		return intArray;
	} getintArray {
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		Arrays.sort(intArray);
		return intArray;
	} int[] intArray = new int[strArray.length]; intArray new int[strArray.length] strArray.length strArray strArray.length for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		} int i = 0; int i = 0; i 0 i < intArray.length i intArray.length intArray intArray.length i++ i++ i {
			intArray[i] = Integer.parseInt(strArray[i]);
		} {
			intArray[i] = Integer.parseInt(strArray[i]);
		} intArray[i] = Integer.parseInt(strArray[i]) intArray[i] intArray i Integer.parseInt(strArray[i]) Integer.parseInt Integer strArray[i] strArray i Arrays.sort(intArray) Arrays.sort Arrays intArray return intArray; intArray String[] strArray strArray private static int getGCD(int[] twoIntOrg) {
		int tmp, diff;
		int[] twoInt = { twoIntOrg[0], twoIntOrg[1] };
		while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		}
		return twoInt[0];
	} getGCD {
		int tmp, diff;
		int[] twoInt = { twoIntOrg[0], twoIntOrg[1] };
		while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		}
		return twoInt[0];
	} int tmp tmp diff; diff int[] twoInt = { twoIntOrg[0], twoIntOrg[1] }; twoInt { twoIntOrg[0], twoIntOrg[1] } twoIntOrg[0] twoIntOrg 0 twoIntOrg[1] twoIntOrg 1 while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		} twoInt[0] != twoInt[1] twoInt[0] twoInt 0 twoInt[1] twoInt 1 {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		} diff = twoInt[1] - twoInt[0] diff twoInt[1] - twoInt[0] twoInt[1] twoInt 1 twoInt[0] twoInt 0 if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			} diff > twoInt[0] diff twoInt[0] twoInt 0 {
				twoInt[1] = diff;
			} twoInt[1] = diff twoInt[1] twoInt 1 diff {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			} tmp = twoInt[0] tmp twoInt[0] twoInt 0 twoInt[0] = diff twoInt[0] twoInt 0 diff twoInt[1] = tmp twoInt[1] twoInt 1 tmp return twoInt[0]; twoInt[0] twoInt 0 int[] twoIntOrg twoIntOrg private static int getLCM(int[] twoInt, int gcd) {
		return twoInt[0] / gcd * twoInt[1];
	} getLCM {
		return twoInt[0] / gcd * twoInt[1];
	} return twoInt[0] / gcd * twoInt[1]; twoInt[0] / gcd * twoInt[1] twoInt[0] / gcd twoInt[0] twoInt 0 gcd twoInt[1] twoInt 1 int[] twoInt twoInt int gcd gcd public class Main {

	/**
	 * AOJ 0005 GCD and LCM
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		String input = bufferedReader.readLine();
		String[] twoStr;
		while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		}
	}

	/**
	 * String????????????int?????????????????????????????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getintArray(String[] strArray) {
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		Arrays.sort(intArray);
		return intArray;
	}

	private static int getGCD(int[] twoIntOrg) {
		int tmp, diff;
		int[] twoInt = { twoIntOrg[0], twoIntOrg[1] };
		while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		}
		return twoInt[0];
	}

	private static int getLCM(int[] twoInt, int gcd) {
		return twoInt[0] / gcd * twoInt[1];
	}
} public class Main {

	/**
	 * AOJ 0005 GCD and LCM
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		String input = bufferedReader.readLine();
		String[] twoStr;
		while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		}
	}

	/**
	 * String????????????int?????????????????????????????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getintArray(String[] strArray) {
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		Arrays.sort(intArray);
		return intArray;
	}

	private static int getGCD(int[] twoIntOrg) {
		int tmp, diff;
		int[] twoInt = { twoIntOrg[0], twoIntOrg[1] };
		while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		}
		return twoInt[0];
	}

	private static int getLCM(int[] twoInt, int gcd) {
		return twoInt[0] / gcd * twoInt[1];
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	/**
	 * AOJ 0005 GCD and LCM
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		String input = bufferedReader.readLine();
		String[] twoStr;
		while (input != null) {
			twoStr = input.split("\\s");
			int[] twoInt = getintArray(twoStr);
			int gcd = getGCD(twoInt);
			int lcm = getLCM(twoInt, gcd);
			System.out.println(gcd + " " + lcm);
			input = bufferedReader.readLine();
		}
	}

	/**
	 * String????????????int?????????????????????????????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getintArray(String[] strArray) {
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		Arrays.sort(intArray);
		return intArray;
	}

	private static int getGCD(int[] twoIntOrg) {
		int tmp, diff;
		int[] twoInt = { twoIntOrg[0], twoIntOrg[1] };
		while (twoInt[0] != twoInt[1]) {
			diff = twoInt[1] - twoInt[0];
			if (diff > twoInt[0]) {
				twoInt[1] = diff;
			} else {
				tmp = twoInt[0];
				twoInt[0] = diff;
				twoInt[1] = tmp;
			}
		}
		return twoInt[0];
	}

	private static int getLCM(int[] twoInt, int gcd) {
		return twoInt[0] / gcd * twoInt[1];
	}
}