

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		}
		scanner.close();
	}

}
 import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		}
		scanner.close();
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		}
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		}
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		} scanner.hasNext() scanner.hasNext scanner {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		} long a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner long b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner long m = a ; m a long n = b ; n b while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			} m % n != 0 m % n m n 0 {
				long tmp = m;
				m = n;
				n = tmp % n;
			} long tmp = m; tmp m m = n m n n = tmp % n n tmp % n tmp n long  GCD = n; GCD n long  LCM = a * b / GCD; LCM a * b / GCD a * b a b GCD System.out.printf("%d %d\n", GCD, LCM) System.out.printf System.out System System.out "%d %d\n" GCD LCM scanner.close() scanner.close scanner String[] args args public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		}
		scanner.close();
	}

} public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		}
		scanner.close();
	}

} Main


import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			long a = scanner.nextInt();
			long b = scanner.nextInt();
			long m = a ;
			long n = b ;
			while(m % n != 0){
				long tmp = m;
				m = n;
				n = tmp % n;
			}
			//最大公約数
			long  GCD = n;
			//最小公倍数
			long  LCM = a * b / GCD;

			System.out.printf("%d %d\n", GCD, LCM);
		}
		scanner.close();
	}

}

