//import java.util.Arrays;
import java.util.Scanner;
class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			long c;
			long r;
			long A = a;
			long B = b;
				while((r = a%b) != 0){
					a=b;
					b=r;
				}
		
				c = A*B/b;
		
				System.out.println(b + " " + c);
		}
	}
}  import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			long c;
			long r;
			long A = a;
			long B = b;
				while((r = a%b) != 0){
					a=b;
					b=r;
				}
		
				c = A*B/b;
		
				System.out.println(b + " " + c);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			long c;
			long r;
			long A = a;
			long B = b;
				while((r = a%b) != 0){
					a=b;
					b=r;
				}
		
				c = A*B/b;
		
				System.out.println(b + " " + c);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			long c;
			long r;
			long A = a;
			long B = b;
				while((r = a%b) != 0){
					a=b;
					b=r;
				}
		
				c = A*B/b;
		
				System.out.println(b + " " + c);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			long c;
			long r;
			long A = a;
			long B = b;
				while((r = a%b) != 0){
					a=b;
					b=r;
				}
		
				c = A*B/b;
		
				System.out.println(b + " " + c);
		} scan.hasNext() scan.hasNext scan {
			long a = scan.nextLong();
			long b = scan.nextLong();
			long c;
			long r;
			long A = a;
			long B = b;
				while((r = a%b) != 0){
					a=b;
					b=r;
				}
		
				c = A*B/b;
		
				System.out.println(b + " " + c);
		} long a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long c; c long r; r long A = a; A a long B = b; B b while((r = a%b) != 0){
					a=b;
					b=r;
				} (r = a%b) != 0 (r = a%b) r a%b a b 0 {
					a=b;
					b=r;
				} a=b a b b=r b r c = A*B/b c A*B/b A*B A B b System.out.println(b + " " + c) System.out.println System.out System System.out b + " " + c b + " " + c b " " c String[] args args
//import java.util.Arrays;
import java.util.Scanner;
class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			long c;
			long r;
			long A = a;
			long B = b;
				while((r = a%b) != 0){
					a=b;
					b=r;
				}
		
				c = A*B/b;
		
				System.out.println(b + " " + c);
		}
	}
} 