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

class Main {

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String st;

		while ((st = br.readLine()) != null) {

			String[] str = st.split(" ");

			BigInteger a = new BigInteger(str[0]);

			BigInteger b = new BigInteger(str[1]);

			System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));

		}

	}

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

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String st;

		while ((st = br.readLine()) != null) {

			String[] str = st.split(" ");

			BigInteger a = new BigInteger(str[0]);

			BigInteger b = new BigInteger(str[1]);

			System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));

		}

	}

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String st;

		while ((st = br.readLine()) != null) {

			String[] str = st.split(" ");

			BigInteger a = new BigInteger(str[0]);

			BigInteger b = new BigInteger(str[1]);

			System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));

		}

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String st;

		while ((st = br.readLine()) != null) {

			String[] str = st.split(" ");

			BigInteger a = new BigInteger(str[0]);

			BigInteger b = new BigInteger(str[1]);

			System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));

		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String st; st while ((st = br.readLine()) != null) {

			String[] str = st.split(" ");

			BigInteger a = new BigInteger(str[0]);

			BigInteger b = new BigInteger(str[1]);

			System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));

		} (st = br.readLine()) != null (st = br.readLine()) st br.readLine() br.readLine br null {

			String[] str = st.split(" ");

			BigInteger a = new BigInteger(str[0]);

			BigInteger b = new BigInteger(str[1]);

			System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));

		} String[] str = st.split(" "); str st.split(" ") st.split st " " BigInteger a = new BigInteger(str[0]); a new BigInteger(str[0]) BigInteger b = new BigInteger(str[1]); b new BigInteger(str[1]) System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b))) System.out.println System.out System System.out a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)) a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)) a.gcd(b) a.gcd a b " " a.multiply(b).divide(a.gcd(b)) a.multiply(b).divide a.multiply(b) a.multiply a b a.gcd(b) a.gcd a b String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

class Main {

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String st;

		while ((st = br.readLine()) != null) {

			String[] str = st.split(" ");

			BigInteger a = new BigInteger(str[0]);

			BigInteger b = new BigInteger(str[1]);

			System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));

		}

	}

}