import java.io.*;
import java.util.StringTokenizer;

class Main {
	public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	}
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util class Main {
	public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	}
} Main public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String buf; buf try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		} catch (Exception e) {
			System.out.println("Exception!");
		} Exception e {
			System.out.println("Exception!");
		} System.out.println("Exception!") System.out.println System.out System System.out "Exception!" {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			}
		} while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			} (buf = br.readLine())!=null (buf = br.readLine()) buf br.readLine() br.readLine br null {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			} StringTokenizer st = new StringTokenizer(buf); st new StringTokenizer(buf) long n = Integer.parseInt(st.nextToken()); n Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st long m = Integer.parseInt(st.nextToken()); m Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st long gcd; gcd long lcm = n*m; lcm n*m n m while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				} n%m!=0 n%m n m 0 {
					long t = m;
					m = n%m;
					n = t;
				} long t = m; t m m = n%m m n%m n m n = t n t gcd = m gcd m lcm = lcm/gcd lcm lcm/gcd lcm gcd System.out.println(gcd+" "+lcm) System.out.println System.out System System.out gcd+" "+lcm gcd+" "+lcm gcd " " lcm String args[] args
import java.io.*;
import java.util.StringTokenizer;

class Main {
	public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				long n = Integer.parseInt(st.nextToken());
				long m = Integer.parseInt(st.nextToken());
				long gcd;
				long lcm = n*m;
				while (n%m!=0) {
					long t = m;
					m = n%m;
					n = t;
				}
				gcd = m;
				lcm = lcm/gcd;
				System.out.println(gcd+" "+lcm);
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	}
}