

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

public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		}
	}
	
	public static long gcd(long x, long y) {
		if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		}
		
		while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		}
		
		return x;
	}

} 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 Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		}
	}
	
	public static long gcd(long x, long y) {
		if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		}
		
		while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		}
		
		return x;
	}

} Main public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		}
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line; line while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		} String[] arr = line.split(" "); arr line.split(" ") line.split line " " long a = Integer.parseInt(arr[0]); a Integer.parseInt(arr[0]) Integer.parseInt Integer arr[0] arr 0 long b = Integer.parseInt(arr[1]); b Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 long n_gcd = gcd(a, b); n_gcd gcd(a, b) gcd a b long n_lcm = a * b / n_gcd; n_lcm a * b / n_gcd a * b a b n_gcd System.out.println(n_gcd + " " + n_lcm) System.out.println System.out System System.out n_gcd + " " + n_lcm n_gcd + " " + n_lcm n_gcd " " n_lcm String[] args args public static long gcd(long x, long y) {
		if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		}
		
		while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		}
		
		return x;
	} gcd {
		if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		}
		
		while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		}
		
		return x;
	} if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		} x < y x y {
			long temp = x;
			x = y;
			y = temp;
		} long temp = x; temp x x = y x y y = temp y temp while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		} y > 0 y 0 {
			long r = x % y;
			x = y;
			y = r;
		} long r = x % y; r x % y x y x = y x y y = r y r return x; x long x x long y y public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		}
	}
	
	public static long gcd(long x, long y) {
		if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		}
		
		while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		}
		
		return x;
	}

} public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		}
	}
	
	public static long gcd(long x, long y) {
		if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		}
		
		while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		}
		
		return x;
	}

} 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 Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			long a = Integer.parseInt(arr[0]);
			long b = Integer.parseInt(arr[1]);
			
			long n_gcd = gcd(a, b);
			long n_lcm = a * b / n_gcd;
			
			System.out.println(n_gcd + " " + n_lcm);
		}
	}
	
	public static long gcd(long x, long y) {
		if (x < y) {
			long temp = x;
			x = y;
			y = temp;
		}
		
		while (y > 0) {
			long r = x % y;
			x = y;
			y = r;
		}
		
		return x;
	}

}