import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Formatter;

class Main{

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try{
			while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			}
		}
		catch(Exception e){
			return;
		}
	}
	
	private static int Yukurid(int a,int b){
		if(a < b){
			int temp = b;
			b = a;
			a = temp;
		}
		//double div = (double)a / b;
		int remainder = a % b;
		
		if(remainder == 0){ return b; }
		else { return Yukurid(b,remainder); }
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Formatter; Formatter java.util class Main{

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try{
			while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			}
		}
		catch(Exception e){
			return;
		}
	}
	
	private static int Yukurid(int a,int b){
		if(a < b){
			int temp = b;
			b = a;
			a = temp;
		}
		//double div = (double)a / b;
		int remainder = a % b;
		
		if(remainder == 0){ return b; }
		else { return Yukurid(b,remainder); }
	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try{
			while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			}
		}
		catch(Exception e){
			return;
		}
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try{
			while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			}
		}
		catch(Exception e){
			return;
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try{
			while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			}
		}
		catch(Exception e){
			return;
		} catch(Exception e){
			return;
		} Exception e {
			return;
		} return; {
			while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			}
		} while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			} true {
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			} String[] nums = br.readLine().split(" "); nums br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(nums[0]); a Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 int b = Integer.parseInt(nums[1]); b Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 int yaku = Yukurid(a,b); yaku Yukurid(a,b) Yukurid a b int bai = a * (b / yaku); bai a * (b / yaku) a (b / yaku) b yaku System.out.println(yaku + " " + bai) System.out.println System.out System System.out yaku + " " + bai yaku + " " + bai yaku " " bai String[] args args private static int Yukurid(int a,int b){
		if(a < b){
			int temp = b;
			b = a;
			a = temp;
		}
		//double div = (double)a / b;
		int remainder = a % b;
		
		if(remainder == 0){ return b; }
		else { return Yukurid(b,remainder); }
	} Yukurid {
		if(a < b){
			int temp = b;
			b = a;
			a = temp;
		}
		//double div = (double)a / b;
		int remainder = a % b;
		
		if(remainder == 0){ return b; }
		else { return Yukurid(b,remainder); }
	} if(a < b){
			int temp = b;
			b = a;
			a = temp;
		} a < b a b {
			int temp = b;
			b = a;
			a = temp;
		} int temp = b; temp b b = a b a a = temp a temp int remainder = a % b; remainder a % b a b if(remainder == 0){ return b; }
		else { return Yukurid(b,remainder); } remainder == 0 remainder 0 { return b; } return b; b { return Yukurid(b,remainder); } return Yukurid(b,remainder); Yukurid(b,remainder) Yukurid b remainder int a a int b b
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Formatter;

class Main{

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try{
			while(true){
				String[] nums = br.readLine().split(" ");
				int a = Integer.parseInt(nums[0]);
				int b = Integer.parseInt(nums[1]);
				int yaku = Yukurid(a,b);
				int bai = a * (b / yaku);
				System.out.println(yaku + " " + bai);
			}
		}
		catch(Exception e){
			return;
		}
	}
	
	private static int Yukurid(int a,int b){
		if(a < b){
			int temp = b;
			b = a;
			a = temp;
		}
		//double div = (double)a / b;
		int remainder = a % b;
		
		if(remainder == 0){ return b; }
		else { return Yukurid(b,remainder); }
	}

}