import java.util.Scanner;


public class Main{
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		long a, b;
		while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		}
		sc.close();
	}
	
	static long GCD(long a, long b) {
		return a * b / LCM(a, b);
	}
	
	static long LCM(long a, long b) {
		long n0 = (a >= b) ? a: b;
		long n1 = (a >= b) ? b: a;
		
		if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		long a, b;
		while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		}
		sc.close();
	}
	
	static long GCD(long a, long b) {
		return a * b / LCM(a, b);
	}
	
	static long LCM(long a, long b) {
		long n0 = (a >= b) ? a: b;
		long n1 = (a >= b) ? b: a;
		
		if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1);
	}
} Main public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		long a, b;
		while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		}
		sc.close();
	} main {
		
		Scanner sc = new Scanner(System.in);
		long a, b;
		while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a a b; b while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		} sc.hasNext() sc.hasNext sc {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		} a = sc.nextLong() a sc.nextLong() sc.nextLong sc b = sc.nextLong() b sc.nextLong() sc.nextLong sc System.out.println(LCM(a, b) + " " + GCD(a, b)) System.out.println System.out System System.out LCM(a, b) + " " + GCD(a, b) LCM(a, b) + " " + GCD(a, b) LCM(a, b) LCM a b " " GCD(a, b) GCD a b sc.close() sc.close sc String[] args args static long GCD(long a, long b) {
		return a * b / LCM(a, b);
	} GCD {
		return a * b / LCM(a, b);
	} return a * b / LCM(a, b); a * b / LCM(a, b) a * b a b LCM(a, b) LCM a b long a a long b b static long LCM(long a, long b) {
		long n0 = (a >= b) ? a: b;
		long n1 = (a >= b) ? b: a;
		
		if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1);
	} LCM {
		long n0 = (a >= b) ? a: b;
		long n1 = (a >= b) ? b: a;
		
		if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1);
	} long n0 = (a >= b) ? a: b; n0 (a >= b) ? a: b (a >= b) a b a b long n1 = (a >= b) ? b: a; n1 (a >= b) ? b: a (a >= b) a b b a if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1); n1 == 0 n1 0 return n0; n0 return LCM(n1, n0 % n1); LCM(n1, n0 % n1) LCM n1 n0 % n1 n0 n1 long a a long b b public class Main{
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		long a, b;
		while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		}
		sc.close();
	}
	
	static long GCD(long a, long b) {
		return a * b / LCM(a, b);
	}
	
	static long LCM(long a, long b) {
		long n0 = (a >= b) ? a: b;
		long n1 = (a >= b) ? b: a;
		
		if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1);
	}
} public class Main{
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		long a, b;
		while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		}
		sc.close();
	}
	
	static long GCD(long a, long b) {
		return a * b / LCM(a, b);
	}
	
	static long LCM(long a, long b) {
		long n0 = (a >= b) ? a: b;
		long n1 = (a >= b) ? b: a;
		
		if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1);
	}
} Main
import java.util.Scanner;


public class Main{
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		long a, b;
		while(sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(LCM(a, b) + " " + GCD(a, b));
		}
		sc.close();
	}
	
	static long GCD(long a, long b) {
		return a * b / LCM(a, b);
	}
	
	static long LCM(long a, long b) {
		long n0 = (a >= b) ? a: b;
		long n1 = (a >= b) ? b: a;
		
		if(n1 == 0) return n0;
		else return LCM(n1, n0 % n1);
	}
}