import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		}
	}
} Main public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		}
	} main {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		} in.hasNext() in.hasNext in {
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		} long a = in.nextLong(); a in.nextLong() in.nextLong in long b = in.nextLong(); b in.nextLong() in.nextLong in int k = 2; k 2 long lcm = 1; lcm 1 while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			} k < a || k < b k < a k a k < b k b {
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			} while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				} a%k == 0 && b%k == 0 a%k == 0 a%k a k 0 b%k == 0 b%k b k 0 {
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				} a = a/k a a/k a k b = b/k b b/k b k lcm = lcm*k lcm lcm*k lcm k k++ k System.out.println(lcm+" "+(lcm*a*b)) System.out.println System.out System System.out lcm+" "+(lcm*a*b) lcm+" "+(lcm*a*b) lcm " " (lcm*a*b) lcm*a*b lcm a b String[] args args public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long a = in.nextLong();
			long b = in.nextLong();
			int k = 2;
			long lcm = 1;
			while(k < a || k < b){
				while(a%k == 0 && b%k == 0){
					a = a/k;
					b = b/k;
					lcm = lcm*k;
				}
				k++;
			}
			System.out.println(lcm+" "+(lcm*a*b));
		}
	}
}