import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long num1, num2, dividend, divisor, surplus;
		
		while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long num1, num2, dividend, divisor, surplus;
		
		while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long num1, num2, dividend, divisor, surplus;
		
		while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		}
	} main {
		Scanner scan = new Scanner(System.in);
		long num1, num2, dividend, divisor, surplus;
		
		while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long num1 num1 num2 num2 dividend dividend divisor divisor surplus; surplus while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		} scan.hasNext() scan.hasNext scan {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		} num1 = scan.nextLong() num1 scan.nextLong() scan.nextLong scan num2 = scan.nextLong() num2 scan.nextLong() scan.nextLong scan if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			} num1 < num2 num1 num2 {
				dividend = num2;
				divisor = num1;
			} dividend = num2 dividend num2 divisor = num1 divisor num1 {
				dividend = num1;
				divisor = num2;
			} dividend = num1 dividend num1 divisor = num2 divisor num2 surplus = dividend % divisor surplus dividend % divisor dividend divisor while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			} surplus != 0 surplus 0 {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			} dividend = divisor dividend divisor divisor = surplus divisor surplus surplus = dividend % divisor surplus dividend % divisor dividend divisor long gcd = divisor; gcd divisor long lcm = num1 * num2 / divisor; lcm num1 * num2 / divisor num1 * num2 num1 num2 divisor System.out.printf("%d %d\n", gcd, lcm) System.out.printf System.out System System.out "%d %d\n" gcd lcm String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long num1, num2, dividend, divisor, surplus;
		
		while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long num1, num2, dividend, divisor, surplus;
		
		while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long num1, num2, dividend, divisor, surplus;
		
		while(scan.hasNext()) {
			num1 = scan.nextLong();
			num2 = scan.nextLong();
			
			if(num1 < num2) {
				dividend = num2;
				divisor = num1;
			} else {
				dividend = num1;
				divisor = num2;
			}
			
			surplus = dividend % divisor;
			while(surplus != 0) {
				dividend = divisor;
				divisor = surplus;
				surplus = dividend % divisor;
			}
			long gcd = divisor;
			long lcm = num1 * num2 / divisor;
			
			System.out.printf("%d %d\n", gcd, lcm);
			
		}
	}
}