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

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		long 			x, y, origX, origY;
		String			buffer;
		BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in));

		while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		}


	}

} 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 NumberFormatException, IOException {
		long 			x, y, origX, origY;
		String			buffer;
		BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in));

		while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		}


	}

} Main public static void main(String[] args) throws NumberFormatException, IOException {
		long 			x, y, origX, origY;
		String			buffer;
		BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in));

		while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		}


	} main {
		long 			x, y, origX, origY;
		String			buffer;
		BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in));

		while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		}


	} long 			x x y y origX origX origY; origY String			buffer; buffer BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		} (buffer = reader.readLine()) != null (buffer = reader.readLine()) buffer reader.readLine() reader.readLine reader null {
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		} x = Long.parseLong(buffer.split(" ")[0]) x Long.parseLong(buffer.split(" ")[0]) Long.parseLong Long buffer.split(" ")[0] buffer.split(" ") buffer.split buffer " " 0 y = Long.parseLong(buffer.split(" ")[1]) y Long.parseLong(buffer.split(" ")[1]) Long.parseLong Long buffer.split(" ")[1] buffer.split(" ") buffer.split buffer " " 1 origX = x origX x origY = y origY y if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			} x < y x y {
				long tmp = x;
				x = y;
				y = tmp;
			} long tmp = x; tmp x x = y x y y = tmp y tmp long mod; mod while((mod = x % y) != 0){
				x = y;
				y = mod;
			} (mod = x % y) != 0 (mod = x % y) mod x % y x y 0 {
				x = y;
				y = mod;
			} x = y x y y = mod y mod System.out.println(y + " " + (origX * origY / y)) System.out.println System.out System System.out y + " " + (origX * origY / y) y + " " + (origX * origY / y) y " " (origX * origY / y) origX * origY origX origY y String[] args args public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		long 			x, y, origX, origY;
		String			buffer;
		BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in));

		while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		}


	}

} public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		long 			x, y, origX, origY;
		String			buffer;
		BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in));

		while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		}


	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		long 			x, y, origX, origY;
		String			buffer;
		BufferedReader 	reader = new BufferedReader(new InputStreamReader(System.in));

		while((buffer = reader.readLine()) != null){
			x = Long.parseLong(buffer.split(" ")[0]);
			y = Long.parseLong(buffer.split(" ")[1]);

			origX = x;
			origY = y;

			if(x < y){
				long tmp = x;
				x = y;
				y = tmp;
			}

			long mod;
			while((mod = x % y) != 0){
				x = y;
				y = mod;
			}

			System.out.println(y + " " + (origX * origY / y));
		}


	}

}