import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		}
	}

} Main public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		}
	} main {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		} true {
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		} String tmp = br.readLine(); tmp br.readLine() br.readLine br if(tmp == null){
				break;
			} tmp == null tmp null {
				break;
			} break; String[] tmpArray = tmp.split(" "); tmpArray tmp.split(" ") tmp.split tmp " " int a = Integer.parseInt(tmpArray[0]); a Integer.parseInt(tmpArray[0]) Integer.parseInt Integer tmpArray[0] tmpArray 0 int b = Integer.parseInt(tmpArray[1]); b Integer.parseInt(tmpArray[1]) Integer.parseInt Integer tmpArray[1] tmpArray 1 if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			} b > a b a {
				int tmpInt = b;
				b = a;
				a = tmpInt;
			} int tmpInt = b; tmpInt b b = a b a a = tmpInt a tmpInt int GCD = 1; GCD 1 int j = b; j b while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			} j > 1 j 1 {
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			} if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				} a%j == 0 && b%j == 0 a%j == 0 a%j a j 0 b%j == 0 b%j b j 0 {
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				} GCD *= j GCD j a/=j a j b/=j b j j = b j b {
					j--;
				} j-- j int LCM = GCD * a * b; LCM GCD * a * b GCD * a * b GCD a b 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 {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		while(true){
			String tmp = br.readLine();
			
			if(tmp == null){
				break;
			}

			String[] tmpArray = tmp.split(" ");
			int a = Integer.parseInt(tmpArray[0]);
			int b = Integer.parseInt(tmpArray[1]);
			
			//??????a???b??\?????????????????????????????????
			if(b > a){
				int tmpInt = b;
				b = a;
				a = tmpInt;
			}
			//?????§??¬?´???°????±???????
			int GCD = 1;
			
			int j = b;
			while(j > 1){
				if(a%j == 0 && b%j == 0){
					GCD *= j;
					a/=j;
					b/=j;
					j = b;
				}
				else {
					j--;
				}
			}
			
			int LCM = GCD * a * b;
			System.out.println(GCD + " "+ LCM);
		}
	}

}