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));
		
		while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		}
	}

	private static long getGCD(long a, long b){
		long r;
		while ((r = a % b) != 0) {
			a = b;
			b = r;
		}
		return b;
	}

	private static long getLCM(long a, long b) {
		return a * b / getGCD(a, b);
	}
} 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));
		
		while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		}
	}

	private static long getGCD(long a, long b){
		long r;
		while ((r = a % b) != 0) {
			a = b;
			b = r;
		}
		return b;
	}

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		}
	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		} true {
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		} String str =  br.readLine(); str br.readLine() br.readLine br if(str == null || str == ""){
				break;
			} str == null || str == "" str == null str null str == "" str "" {
				break;
			} break; String[] str1Ary = str.split(" "); str1Ary str.split(" ") str.split str " " long a = Integer.parseInt(str1Ary[0]); a Integer.parseInt(str1Ary[0]) Integer.parseInt Integer str1Ary[0] str1Ary 0 long b = Integer.parseInt(str1Ary[1]); b Integer.parseInt(str1Ary[1]) Integer.parseInt Integer str1Ary[1] str1Ary 1 System.out.println(getGCD(a, b) + " " + getLCM(a, b)) System.out.println System.out System System.out getGCD(a, b) + " " + getLCM(a, b) getGCD(a, b) + " " + getLCM(a, b) getGCD(a, b) getGCD a b " " getLCM(a, b) getLCM a b String[] args args private static long getGCD(long a, long b){
		long r;
		while ((r = a % b) != 0) {
			a = b;
			b = r;
		}
		return b;
	} getGCD {
		long r;
		while ((r = a % b) != 0) {
			a = b;
			b = r;
		}
		return b;
	} long r; r while ((r = a % b) != 0) {
			a = b;
			b = r;
		} (r = a % b) != 0 (r = a % b) r a % b a b 0 {
			a = b;
			b = r;
		} a = b a b b = r b r return b; b long a a long b b private static long getLCM(long a, long b) {
		return a * b / getGCD(a, b);
	} getLCM {
		return a * b / getGCD(a, b);
	} return a * b / getGCD(a, b); a * b / getGCD(a, b) a * b a b getGCD(a, b) getGCD a b long a a long b b public class Main {

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		}
	}

	private static long getGCD(long a, long b){
		long r;
		while ((r = a % b) != 0) {
			a = b;
			b = r;
		}
		return b;
	}

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

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		}
	}

	private static long getGCD(long a, long b){
		long r;
		while ((r = a % b) != 0) {
			a = b;
			b = r;
		}
		return b;
	}

	private static long getLCM(long a, long b) {
		return a * b / getGCD(a, b);
	}
} 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));
		
		while(true){
			String str =  br.readLine();
			if(str == null || str == ""){
				break;
			}
			String[] str1Ary = str.split(" ");
			long a = Integer.parseInt(str1Ary[0]);
			long b = Integer.parseInt(str1Ary[1]);
			System.out.println(getGCD(a, b) + " " + getLCM(a, b));
		}
	}

	private static long getGCD(long a, long b){
		long r;
		while ((r = a % b) != 0) {
			a = b;
			b = r;
		}
		return b;
	}

	private static long getLCM(long a, long b) {
		return a * b / getGCD(a, b);
	}
}