import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a, b;
		int GCD = 0, LCM = 0;
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		}
	}

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

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a, b;
		int GCD = 0, LCM = 0;
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		}
	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a, b;
		int GCD = 0, LCM = 0;
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		int a, b;
		int GCD = 0, LCM = 0;
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		}
	} int a a b; b int GCD = 0 GCD 0 LCM = 0; LCM 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		} scan.hasNext() scan.hasNext scan {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		} a = scan.nextInt() a scan.nextInt() scan.nextInt scan b = scan.nextInt() b scan.nextInt() scan.nextInt scan GCD = 0 GCD 0 LCM = 0 LCM 0 for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			} int i = 1; int i = 1; i 1 i <= Math.min(a, b) i Math.min(a, b) Math.min Math a b i++ i++ i {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			} {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			} if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				} (a % i == 0) && (b % i == 0) (a % i == 0) a % i a i 0 (b % i == 0) b % i b i 0 {
					GCD = i;
				} GCD = i GCD i for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			} int i = 1; int i = 1; i 1 i <= Math.min(b, 2000000000) i Math.min(b, 2000000000) Math.min Math b 2000000000 i++ i++ i {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			} {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			} if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 } (a*i)%b==0 (a*i)%b (a*i) a i b 0 {
					 LCM = a*i;
					 break;
				 } LCM = a*i LCM a*i a i break; System.out.println(GCD+" "+LCM) System.out.println System.out System System.out GCD+" "+LCM GCD+" "+LCM GCD " " LCM String[] args args public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a, b;
		int GCD = 0, LCM = 0;
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		}
	}

} public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a, b;
		int GCD = 0, LCM = 0;
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		}
	}

} Main
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a, b;
		int GCD = 0, LCM = 0;
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			a = scan.nextInt();
			b = scan.nextInt();
			GCD = 0;
			LCM = 0;
			/* 最大公約数 */
			for (int i = 1; i <= Math.min(a, b); i++) {
				if ((a % i == 0) && (b % i == 0)) {
					GCD = i;
				}
			}
			/* 最小公倍数 */
			for (int i = 1; i <= Math.min(b, 2000000000); i++) {
				 if((a*i)%b==0){
					 LCM = a*i;
					 break;
				 }
			}
			System.out.println(GCD+" "+LCM);
		}
	}

}