import java.util.Scanner;
class Main{
	public static void main(String[] a){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int num1 = scan.nextInt(), num2 = scan.nextInt();
			if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			}
			int div = euclid(num1, num2);
			System.out.println(div + " " + num1 / div * num2);
		}
	}
	static int euclid(int num1, int num2){
		if(num1 % num2 == 0) return num2;
		return euclid(num2, num1 % num2);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] a){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int num1 = scan.nextInt(), num2 = scan.nextInt();
			if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			}
			int div = euclid(num1, num2);
			System.out.println(div + " " + num1 / div * num2);
		}
	}
	static int euclid(int num1, int num2){
		if(num1 % num2 == 0) return num2;
		return euclid(num2, num1 % num2);
	}
} Main public static void main(String[] a){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int num1 = scan.nextInt(), num2 = scan.nextInt();
			if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			}
			int div = euclid(num1, num2);
			System.out.println(div + " " + num1 / div * num2);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int num1 = scan.nextInt(), num2 = scan.nextInt();
			if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			}
			int div = euclid(num1, num2);
			System.out.println(div + " " + num1 / div * num2);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			int num1 = scan.nextInt(), num2 = scan.nextInt();
			if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			}
			int div = euclid(num1, num2);
			System.out.println(div + " " + num1 / div * num2);
		} scan.hasNext() scan.hasNext scan {
			int num1 = scan.nextInt(), num2 = scan.nextInt();
			if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			}
			int div = euclid(num1, num2);
			System.out.println(div + " " + num1 / div * num2);
		} int num1 = scan.nextInt() num1 scan.nextInt() scan.nextInt scan num2 = scan.nextInt(); num2 scan.nextInt() scan.nextInt scan if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			} num1 < num2 num1 num2 {
				int sub = num1;
				num1 = num2;
				num2 = sub;
			} int sub = num1; sub num1 num1 = num2 num1 num2 num2 = sub num2 sub int div = euclid(num1, num2); div euclid(num1, num2) euclid num1 num2 System.out.println(div + " " + num1 / div * num2) System.out.println System.out System System.out div + " " + num1 / div * num2 div + " " + num1 / div * num2 div " " num1 / div * num2 num1 / div num1 div num2 String[] a a static int euclid(int num1, int num2){
		if(num1 % num2 == 0) return num2;
		return euclid(num2, num1 % num2);
	} euclid {
		if(num1 % num2 == 0) return num2;
		return euclid(num2, num1 % num2);
	} if(num1 % num2 == 0) return num2; num1 % num2 == 0 num1 % num2 num1 num2 0 return num2; num2 return euclid(num2, num1 % num2); euclid(num2, num1 % num2) euclid num2 num1 % num2 num1 num2 int num1 num1 int num2 num2
import java.util.Scanner;
class Main{
	public static void main(String[] a){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int num1 = scan.nextInt(), num2 = scan.nextInt();
			if(num1 < num2){
				int sub = num1;
				num1 = num2;
				num2 = sub;
			}
			int div = euclid(num1, num2);
			System.out.println(div + " " + num1 / div * num2);
		}
	}
	static int euclid(int num1, int num2){
		if(num1 % num2 == 0) return num2;
		return euclid(num2, num1 % num2);
	}
}