import java.io.*;
//import java.math.BigDecimal;
//import java.lang.reflect.Array;
//import java.util.Arrays;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		}

	}

} import java.io.*; io.* java public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		}

	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		}

	} main {
		// TODO Auto-generated method stub
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		}

	} try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		} Exception e {
			// TODO: handle exception
			System.exit(0);
		} System.exit(0) System.exit System 0 {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null); line != null line null {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} String[] in = line.split(" ", 0); in line.split(" ", 0) line.split line " " 0 int a = Integer.parseInt(in[0]); a Integer.parseInt(in[0]) Integer.parseInt Integer in[0] in 0 int b = Integer.parseInt(in[1]); b Integer.parseInt(in[1]) Integer.parseInt Integer in[1] in 1 while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				} a != b a b {
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				} if(a > b){
						a = a- b;
					}else{
						b = b - a;
					} a > b a b {
						a = a- b;
					} a = a- b a a- b a b {
						b = b - a;
					} b = b - a b b - a b a long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a; out2 Long.parseLong(in[0]) * Long.parseLong(in[1]) / a Long.parseLong(in[0]) * Long.parseLong(in[1]) Long.parseLong(in[0]) Long.parseLong Long in[0] in 0 Long.parseLong(in[1]) Long.parseLong Long in[1] in 1 a System.out.println(a + " " + out2) System.out.println System.out System System.out a + " " + out2 a + " " + out2 a " " out2 line = br.readLine() line br.readLine() br.readLine br String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		}

	}

} Main
import java.io.*;
//import java.math.BigDecimal;
//import java.lang.reflect.Array;
//import java.util.Arrays;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String line = br.readLine();
			do {
				String[] in = line.split(" ", 0);
				//???????????????????¨????
				int a = Integer.parseInt(in[0]);
				int b = Integer.parseInt(in[1]);
				while (a != b){
					if(a > b){
						a = a- b;
					}else{
						b = b - a;
					}
				}
				long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
				System.out.println(a + " " + out2);
				//???????????§??????
				line = br.readLine();
			} while (line != null);

		} catch (Exception e) {
			// TODO: handle exception
			System.exit(0);
		}

	}

}