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

public class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		
		try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	static int getLCM(int a, int b){
		int i = a;
		int j = b;
		while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		}
		return i;
	}

} 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) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		
		try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	static int getLCM(int a, int b){
		int i = a;
		int j = b;
		while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		}
		return i;
	}

} Main public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		
		try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		
		try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = null; line null try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			} line = line.trim() line line.trim() line.trim line String[] values = line.split("\\s"); values line.split("\\s") line.split line "\\s" if(values.length != 2) System.exit(-1); values.length != 2 values.length values values.length 2 System.exit(-1) System.exit System -1 1 int[] value = new int[2]; value new int[2] 2 int i = 0; i 0 for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				} String s values {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				} {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				} value[i] = Integer.parseInt(s) value[i] value i Integer.parseInt(s) Integer.parseInt Integer s if(value[i] > 2000000000 || value[i] < 0) System.exit(-2); value[i] > 2000000000 || value[i] < 0 value[i] > 2000000000 value[i] value i 2000000000 value[i] < 0 value[i] value i 0 System.exit(-2) System.exit System -2 2 i++ i int a = value[0]; a value[0] value 0 int b = value[1]; b value[1] value 1 int lcm = getLCM(a, b); lcm getLCM(a, b) getLCM a b System.out.println(getLCM(a, b) + " " + a * (b / lcm)) System.out.println System.out System System.out getLCM(a, b) + " " + a * (b / lcm) getLCM(a, b) + " " + a * (b / lcm) getLCM(a, b) getLCM a b " " a * (b / lcm) a (b / lcm) b lcm String[] args args static int getLCM(int a, int b){
		int i = a;
		int j = b;
		while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		}
		return i;
	} getLCM {
		int i = a;
		int j = b;
		while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		}
		return i;
	} int i = a; i a int j = b; j b while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		} i != j i j {
			if(i > j) i -= j;
			else j -= i;
		} if(i > j) i -= j;
			else j -= i; i > j i j i -= j i j j -= i j i return i; i int a a int b b public class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		
		try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	static int getLCM(int a, int b){
		int i = a;
		int j = b;
		while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		}
		return i;
	}

} public class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		
		try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	static int getLCM(int a, int b){
		int i = a;
		int j = b;
		while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		}
		return i;
	}

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

public class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = null;
		
		try {
			while((line = br.readLine()) != null) {
				line = line.trim();
				String[] values = line.split("\\s");
				if(values.length != 2) System.exit(-1);
				
				int[] value = new int[2];
				int i = 0;
				for(String s : values) {
					value[i] = Integer.parseInt(s);
					if(value[i] > 2000000000 || value[i] < 0) System.exit(-2);
					i++;
				}
				int a = value[0];
				int b = value[1];

				int lcm = getLCM(a, b);
				
				System.out.println(getLCM(a, b) + " " + a * (b / lcm));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	static int getLCM(int a, int b){
		int i = a;
		int j = b;
		while(i != j) {
			if(i > j) i -= j;
			else j -= i;
		}
		return i;
	}

}