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

//public class Problem0005_GCDandLCM {
public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	void showAnswer(int x, int y) {
		int oddX = x;
		int oddY = y;
		int gcd = 1;	//Ååöñ
		
		while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		}
		while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		}
		
		int min = getMin(x, y);
		int denominator = 5;	//ªêi±êÅë¤Æ·é)
		for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		}
		
		int lcm = gcd * oddX * oddY;
		System.out.println(gcd + " " + lcm);
	}
	int getMin(int x, int y) {
		int min;
		if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		}
		return min;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	void showAnswer(int x, int y) {
		int oddX = x;
		int oddY = y;
		int gcd = 1;	//Ååöñ
		
		while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		}
		while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		}
		
		int min = getMin(x, y);
		int denominator = 5;	//ªêi±êÅë¤Æ·é)
		for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		}
		
		int lcm = gcd * oddX * oddY;
		System.out.println(gcd + " " + lcm);
	}
	int getMin(int x, int y) {
		int min;
		if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		}
		return min;
	}
} Main public static void main(String[] args) {
		try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	} main {
		try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	} try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		} catch(Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} Main test = new Main(); test new Main() BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String line; line while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			} (line = reader.readLine()) != null (line = reader.readLine()) line reader.readLine() reader.readLine reader null {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			} try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				} catch(NumberFormatException e) {
					break;
				} NumberFormatException e {
					break;
				} break; {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} String[] textArray = line.split(" "); textArray line.split(" ") line.split line " " int[] numbers = new int[2]; numbers new int[2] 2 for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
						numbers[i] = Integer.parseInt(textArray[i]);
					} {
						numbers[i] = Integer.parseInt(textArray[i]);
					} numbers[i] = Integer.parseInt(textArray[i]) numbers[i] numbers i Integer.parseInt(textArray[i]) Integer.parseInt Integer textArray[i] textArray i test.showAnswer(numbers[0], numbers[1]) test.showAnswer test numbers[0] numbers 0 numbers[1] numbers 1 String[] args args void showAnswer(int x, int y) {
		int oddX = x;
		int oddY = y;
		int gcd = 1;	//Ååöñ
		
		while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		}
		while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		}
		
		int min = getMin(x, y);
		int denominator = 5;	//ªêi±êÅë¤Æ·é)
		for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		}
		
		int lcm = gcd * oddX * oddY;
		System.out.println(gcd + " " + lcm);
	} showAnswer {
		int oddX = x;
		int oddY = y;
		int gcd = 1;	//Ååöñ
		
		while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		}
		while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		}
		
		int min = getMin(x, y);
		int denominator = 5;	//ªêi±êÅë¤Æ·é)
		for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		}
		
		int lcm = gcd * oddX * oddY;
		System.out.println(gcd + " " + lcm);
	} int oddX = x; oddX x int oddY = y; oddY y int gcd = 1; gcd 1 while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		} oddX % 2 == 0 && oddY % 2 == 0 oddX % 2 == 0 oddX % 2 oddX 2 0 oddY % 2 == 0 oddY % 2 oddY 2 0 {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		} oddX = oddX / 2 oddX oddX / 2 oddX 2 oddY = oddY / 2 oddY oddY / 2 oddY 2 gcd = gcd * 2 gcd gcd * 2 gcd 2 while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		} oddX % 3 == 0 && oddY % 3 == 0 oddX % 3 == 0 oddX % 3 oddX 3 0 oddY % 3 == 0 oddY % 3 oddY 3 0 {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		} oddX = oddX / 3 oddX oddX / 3 oddX 3 oddY = oddY / 3 oddY oddY / 3 oddY 3 gcd = gcd * 3 gcd gcd * 3 gcd 3 int min = getMin(x, y); min getMin(x, y) getMin x y int denominator = 5; denominator 5 for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		} int i = 0; int i = 0; i 0 denominator < Math.sqrt(min) denominator Math.sqrt(min) Math.sqrt Math min i++ i++ i {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		} {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		} while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			} oddX % denominator == 0 && oddY % denominator == 0 oddX % denominator == 0 oddX % denominator oddX denominator 0 oddY % denominator == 0 oddY % denominator oddY denominator 0 {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			} oddX = oddX / denominator oddX oddX / denominator oddX denominator oddY = oddY / denominator oddY oddY / denominator oddY denominator gcd = gcd * denominator gcd gcd * denominator gcd denominator if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			} i % 2 == 1 i % 2 i 2 1 {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} denominator = denominator + 4 denominator denominator + 4 denominator 4 {
				denominator = denominator + 2;
			} denominator = denominator + 2 denominator denominator + 2 denominator 2 int lcm = gcd * oddX * oddY; lcm gcd * oddX * oddY gcd * oddX * oddY gcd oddX oddY System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm int x x int y y int getMin(int x, int y) {
		int min;
		if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		}
		return min;
	} getMin {
		int min;
		if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		}
		return min;
	} int min; min if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		} x > y x y {	//y¬
			min = y;
		} min = y min y {	//x¬
			min = x;
		} min = x min x return min; min int x x int y y public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	void showAnswer(int x, int y) {
		int oddX = x;
		int oddY = y;
		int gcd = 1;	//Ååöñ
		
		while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		}
		while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		}
		
		int min = getMin(x, y);
		int denominator = 5;	//ªêi±êÅë¤Æ·é)
		for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		}
		
		int lcm = gcd * oddX * oddY;
		System.out.println(gcd + " " + lcm);
	}
	int getMin(int x, int y) {
		int min;
		if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		}
		return min;
	}
} public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	void showAnswer(int x, int y) {
		int oddX = x;
		int oddY = y;
		int gcd = 1;	//Ååöñ
		
		while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		}
		while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		}
		
		int min = getMin(x, y);
		int denominator = 5;	//ªêi±êÅë¤Æ·é)
		for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		}
		
		int lcm = gcd * oddX * oddY;
		System.out.println(gcd + " " + lcm);
	}
	int getMin(int x, int y) {
		int min;
		if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		}
		return min;
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

//public class Problem0005_GCDandLCM {
public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
			Main test = new Main();
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				try {
					String[] textArray = line.split(" ");
					int[] numbers = new int[2];
					for(int i = 0; i < 2; i++) {
						numbers[i] = Integer.parseInt(textArray[i]);
					}
					test.showAnswer(numbers[0], numbers[1]);
				} catch(NumberFormatException e) {
					break;
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	void showAnswer(int x, int y) {
		int oddX = x;
		int oddY = y;
		int gcd = 1;	//Ååöñ
		
		while(oddX % 2 == 0 && oddY % 2 == 0) {
		//	System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 2;
			oddY = oddY / 2;
			gcd = gcd * 2;
		}
		while(oddX % 3 == 0 && oddY % 3 == 0) {
		//	System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			oddX = oddX / 3;
			oddY = oddY / 3;
			gcd = gcd * 3;
		}
		
		int min = getMin(x, y);
		int denominator = 5;	//ªêi±êÅë¤Æ·é)
		for(int i = 0; denominator < Math.sqrt(min); i++) {
		//	System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
			while(oddX % denominator == 0 && oddY % denominator == 0) {
				oddX = oddX / denominator;
				oddY = oddY / denominator;
				gcd = gcd * denominator;
			}
			if(i % 2 == 1) {	//2Æ3Ì{ðòÎ·
				denominator = denominator + 4;
			} else {
				denominator = denominator + 2;
			}
		}
		
		int lcm = gcd * oddX * oddY;
		System.out.println(gcd + " " + lcm);
	}
	int getMin(int x, int y) {
		int min;
		if(x > y) {	//y¬
			min = y;
		} else {	//x¬
			min = x;
		}
		return min;
	}
}