import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		

		Scanner stdin = new Scanner(System.in);
		long a = 0;
		long b = 0;
		long ab = 0;
		long r = 0;
		long gcd = 0;
		long lcm = 0;
		long temp = 0;
		while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		

		Scanner stdin = new Scanner(System.in);
		long a = 0;
		long b = 0;
		long ab = 0;
		long r = 0;
		long gcd = 0;
		long lcm = 0;
		long temp = 0;
		while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		}
	}
} Main public static void main(String[] args) {

		

		Scanner stdin = new Scanner(System.in);
		long a = 0;
		long b = 0;
		long ab = 0;
		long r = 0;
		long gcd = 0;
		long lcm = 0;
		long temp = 0;
		while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		}
	} main {

		

		Scanner stdin = new Scanner(System.in);
		long a = 0;
		long b = 0;
		long ab = 0;
		long r = 0;
		long gcd = 0;
		long lcm = 0;
		long temp = 0;
		while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		}
	} Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) long a = 0; a 0 long b = 0; b 0 long ab = 0; ab 0 long r = 0; r 0 long gcd = 0; gcd 0 long lcm = 0; lcm 0 long temp = 0; temp 0 while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		} stdin.hasNext() stdin.hasNext stdin {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		} a = stdin.nextInt() a stdin.nextInt() stdin.nextInt stdin b = stdin.nextInt() b stdin.nextInt() stdin.nextInt stdin ab = a * b ab a * b a b if(a < b) {
				temp = a;
				a = b;
				b = temp;
			} a < b a b {
				temp = a;
				a = b;
				b = temp;
			} temp = a temp a a = b a b b = temp b temp if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			} a >= b a b {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			} do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1); r != 1 r 1 {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				} r = a % b r a % b a b if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					} r == 0 r 0 {
						break;
					} break; {
						a = b;
						b = r;
					} a = b a b b = r b r gcd = b gcd b lcm = ab / b lcm ab / b ab b 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) {

		

		Scanner stdin = new Scanner(System.in);
		long a = 0;
		long b = 0;
		long ab = 0;
		long r = 0;
		long gcd = 0;
		long lcm = 0;
		long temp = 0;
		while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		}
	}
} public class Main {

	public static void main(String[] args) {

		

		Scanner stdin = new Scanner(System.in);
		long a = 0;
		long b = 0;
		long ab = 0;
		long r = 0;
		long gcd = 0;
		long lcm = 0;
		long temp = 0;
		while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		

		Scanner stdin = new Scanner(System.in);
		long a = 0;
		long b = 0;
		long ab = 0;
		long r = 0;
		long gcd = 0;
		long lcm = 0;
		long temp = 0;
		while(stdin.hasNext()) {
			a = stdin.nextInt();
			b = stdin.nextInt();
			ab = a * b;

			if(a < b) {
				temp = a;
				a = b;
				b = temp;
			}
			if(a >= b) {
				do {
					r = a % b;
					if(r == 0) {
						break;
					} else {
						a = b;
						b = r;
					}
				}while(r != 1);
				gcd = b;
				lcm = ab / b;
				System.out.println(gcd + " " + lcm);

			}
		}
	}
}