import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] splitedStr;
		List<BigInteger> a = new ArrayList<BigInteger>();
		List<BigInteger> b = new ArrayList<BigInteger>();
		BigInteger gcd;

		while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		}

		for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		}
	}
} 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 import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] splitedStr;
		List<BigInteger> a = new ArrayList<BigInteger>();
		List<BigInteger> b = new ArrayList<BigInteger>();
		BigInteger gcd;

		while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		}

		for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] splitedStr;
		List<BigInteger> a = new ArrayList<BigInteger>();
		List<BigInteger> b = new ArrayList<BigInteger>();
		BigInteger gcd;

		while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		}

		for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] splitedStr;
		List<BigInteger> a = new ArrayList<BigInteger>();
		List<BigInteger> b = new ArrayList<BigInteger>();
		BigInteger gcd;

		while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		}

		for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str String[] splitedStr; splitedStr List<BigInteger> a = new ArrayList<BigInteger>(); a new ArrayList<BigInteger>() List<BigInteger> b = new ArrayList<BigInteger>(); b new ArrayList<BigInteger>() BigInteger gcd; gcd while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		} splitedStr = str.split(" ") splitedStr str.split(" ") str.split str " " a.add(new BigInteger(splitedStr[0])) a.add a new BigInteger(splitedStr[0]) b.add(new BigInteger(splitedStr[1])) b.add b new BigInteger(splitedStr[1]) for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		} int i = 0; int i = 0; i 0 i < a.size() i a.size() a.size a i++ i++ i {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		} {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		} gcd = a.get(i).gcd(b.get(i)) gcd a.get(i).gcd(b.get(i)) a.get(i).gcd a.get(i) a.get a i b.get(i) b.get b i System.out.print(gcd + " ") System.out.print System.out System System.out gcd + " " gcd " " System.out.println(a.get(i).multiply(b.get(i)).divide(gcd)) System.out.println System.out System System.out a.get(i).multiply(b.get(i)).divide(gcd) a.get(i).multiply(b.get(i)).divide a.get(i).multiply(b.get(i)) a.get(i).multiply a.get(i) a.get a i b.get(i) b.get b i gcd String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] splitedStr;
		List<BigInteger> a = new ArrayList<BigInteger>();
		List<BigInteger> b = new ArrayList<BigInteger>();
		BigInteger gcd;

		while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		}

		for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		}
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] splitedStr;
		List<BigInteger> a = new ArrayList<BigInteger>();
		List<BigInteger> b = new ArrayList<BigInteger>();
		BigInteger gcd;

		while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		}

		for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] splitedStr;
		List<BigInteger> a = new ArrayList<BigInteger>();
		List<BigInteger> b = new ArrayList<BigInteger>();
		BigInteger gcd;

		while((str = br.readLine()) != null) {
			splitedStr = str.split(" ");
			a.add(new BigInteger(splitedStr[0]));
			b.add(new BigInteger(splitedStr[1]));
		}

		for(int i = 0; i < a.size(); i++) {
			gcd = a.get(i).gcd(b.get(i));
			System.out.print(gcd + " ");
			System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
		}
	}
}