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

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} 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 in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String x = ""; x "" try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} NumberFormatException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} IOException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			} (x = in.readLine()) != null (x = in.readLine()) x in.readLine() in.readLine in null {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			} String[] ab = x.split(" "); ab x.split(" ") x.split x " " long a = Integer.parseInt(ab[0]); a Integer.parseInt(ab[0]) Integer.parseInt Integer ab[0] ab 0 long b = Integer.parseInt(ab[1]); b Integer.parseInt(ab[1]) Integer.parseInt Integer ab[1] ab 1 if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				} a > b a b {
					long tmp = a;
					a = b;
					b = tmp;
				} long tmp = a; tmp a a = b a b b = tmp b tmp long tmp; tmp long ta = a; ta a long tb = b; tb b while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				} (tmp = tb % ta) != 0 (tmp = tb % ta) tmp tb % ta tb ta 0 {
					tb = ta;
					ta = tmp;
				} tb = ta tb ta ta = tmp ta tmp long gcd = ta; gcd ta long lcm = a * (b / gcd); lcm a * (b / gcd) a (b / gcd) b gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] args args public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		try {
			while ((x = in.readLine()) != null) {
				String[] ab = x.split(" ");
				long a = Integer.parseInt(ab[0]);
				long b = Integer.parseInt(ab[1]);
				
				if (a > b) {
					long tmp = a;
					a = b;
					b = tmp;
				}
				
				long tmp;
				long ta = a;
				long tb = b;
				while ((tmp = tb % ta) != 0) {
					tb = ta;
					ta = tmp;
				}
				
				long gcd = ta;
				long lcm = a * (b / gcd);
				
				System.out.println(gcd + " " + lcm);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}