import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		}
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最大公約数(GCD)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getGCD(long numA,long numB){
		//以下、ユークリッドの互除法
		if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		}
		long r;
		while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		}
		long GCD = numA;

		return GCD;
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最小公倍数(LCM)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getLCM(long numA,long numB){
		long LCM = 0L;
		LCM = numA / getGCD(numA,numB) * numB;
		return LCM;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		}
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最大公約数(GCD)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getGCD(long numA,long numB){
		//以下、ユークリッドの互除法
		if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		}
		long r;
		while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		}
		long GCD = numA;

		return GCD;
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最小公倍数(LCM)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getLCM(long numA,long numB){
		long LCM = 0L;
		LCM = numA / getGCD(numA,numB) * numB;
		return LCM;
	}
} Main public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		}
	} main {
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		} stdIn.hasNext() stdIn.hasNext stdIn {
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		} long numA = stdIn.nextLong(); numA stdIn.nextLong() stdIn.nextLong stdIn long numB = stdIn.nextLong(); numB stdIn.nextLong() stdIn.nextLong stdIn long GCD = getGCD(numA,numB); GCD getGCD(numA,numB) getGCD numA numB long LCM = getLCM(numA,numB); LCM getLCM(numA,numB) getLCM numA numB System.out.println(GCD + " " + LCM) System.out.println System.out System System.out GCD + " " + LCM GCD + " " + LCM GCD " " LCM String[] args args //++++++++++++++++++++++++++++++++++++++++++++++++++
	//最大公約数(GCD)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getGCD(long numA,long numB){
		//以下、ユークリッドの互除法
		if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		}
		long r;
		while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		}
		long GCD = numA;

		return GCD;
	} getGCD {
		//以下、ユークリッドの互除法
		if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		}
		long r;
		while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		}
		long GCD = numA;

		return GCD;
	} if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		} numA > numB numA numB {
			long temp = numA;
			numA = numB;
			numB = temp;
		} long temp = numA; temp numA numA = numB numA numB numB = temp numB temp long r; r while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		} 0 != numB 0 numB {
			r = numA % numB;
			numA = numB;
			numB = r;
		} r = numA % numB r numA % numB numA numB numA = numB numA numB numB = r numB r long GCD = numA; GCD numA return GCD; GCD long numA numA long numB numB //++++++++++++++++++++++++++++++++++++++++++++++++++
	//最小公倍数(LCM)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getLCM(long numA,long numB){
		long LCM = 0L;
		LCM = numA / getGCD(numA,numB) * numB;
		return LCM;
	} getLCM {
		long LCM = 0L;
		LCM = numA / getGCD(numA,numB) * numB;
		return LCM;
	} long LCM = 0L; LCM 0L LCM = numA / getGCD(numA,numB) * numB LCM numA / getGCD(numA,numB) * numB numA / getGCD(numA,numB) numA getGCD(numA,numB) getGCD numA numB numB return LCM; LCM long numA numA long numB numB public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		}
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最大公約数(GCD)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getGCD(long numA,long numB){
		//以下、ユークリッドの互除法
		if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		}
		long r;
		while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		}
		long GCD = numA;

		return GCD;
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最小公倍数(LCM)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getLCM(long numA,long numB){
		long LCM = 0L;
		LCM = numA / getGCD(numA,numB) * numB;
		return LCM;
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		}
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最大公約数(GCD)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getGCD(long numA,long numB){
		//以下、ユークリッドの互除法
		if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		}
		long r;
		while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		}
		long GCD = numA;

		return GCD;
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最小公倍数(LCM)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getLCM(long numA,long numB){
		long LCM = 0L;
		LCM = numA / getGCD(numA,numB) * numB;
		return LCM;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			long numA = stdIn.nextLong();
			long numB = stdIn.nextLong();
			long GCD = getGCD(numA,numB);				//最大公約数
			long LCM = getLCM(numA,numB);				//最小公倍数
			System.out.println(GCD + " " + LCM);
		}
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最大公約数(GCD)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getGCD(long numA,long numB){
		//以下、ユークリッドの互除法
		if(numA > numB){
			long temp = numA;
			numA = numB;
			numB = temp;
		}
		long r;
		while(0 != numB){
			r = numA % numB;
			numA = numB;
			numB = r;
		}
		long GCD = numA;

		return GCD;
	}

	//++++++++++++++++++++++++++++++++++++++++++++++++++
	//最小公倍数(LCM)取得メソッド
	//++++++++++++++++++++++++++++++++++++++++++++++++++
	public static long getLCM(long numA,long numB){
		long LCM = 0L;
		LCM = numA / getGCD(numA,numB) * numB;
		return LCM;
	}
}