import java.util.Scanner;


public class Main{
	
	static Scanner sc = new Scanner(System.in);
	static long a, b, tmp, max, min, mod, x, y;

	public static void main(String[] args) {
		
		while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		}
	}
	
	public static boolean read(){
		if(!sc.hasNext()) return false;
			
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		}
		
		return true;
	}
	
	public static void solve_max(){
		
		x = a;
		y = b;
		
		while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		}
		
		max = y;
	}
	
	public static void solve_min(){
		min = (a * b) / max;
	}

} import java.util.Scanner; Scanner java.util public class Main{
	
	static Scanner sc = new Scanner(System.in);
	static long a, b, tmp, max, min, mod, x, y;

	public static void main(String[] args) {
		
		while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		}
	}
	
	public static boolean read(){
		if(!sc.hasNext()) return false;
			
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		}
		
		return true;
	}
	
	public static void solve_max(){
		
		x = a;
		y = b;
		
		while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		}
		
		max = y;
	}
	
	public static void solve_min(){
		min = (a * b) / max;
	}

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static long a a b b tmp tmp max max min min mod mod x x y; y public static void main(String[] args) {
		
		while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		}
	} main {
		
		while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		}
	} while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		} read() read {
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		} solve_max() solve_max solve_min() solve_min System.out.println(max + " " + min) System.out.println System.out System System.out max + " " + min max + " " + min max " " min String[] args args public static boolean read(){
		if(!sc.hasNext()) return false;
			
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		}
		
		return true;
	} read {
		if(!sc.hasNext()) return false;
			
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		}
		
		return true;
	} if(!sc.hasNext()) return false; !sc.hasNext() sc.hasNext() sc.hasNext sc return false; false a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		} a < b a b {
			tmp = a;
			a = b;
			b = tmp;
		} tmp = a tmp a a = b a b b = tmp b tmp return true; true public static void solve_max(){
		
		x = a;
		y = b;
		
		while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		}
		
		max = y;
	} solve_max {
		
		x = a;
		y = b;
		
		while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		}
		
		max = y;
	} x = a x a y = b y b while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		} (mod = (x % y)) != 0 (mod = (x % y)) mod (x % y) x y 0 {
			x = y;
			y = mod;
		} x = y x y y = mod y mod max = y max y public static void solve_min(){
		min = (a * b) / max;
	} solve_min {
		min = (a * b) / max;
	} min = (a * b) / max min (a * b) / max (a * b) a b max public class Main{
	
	static Scanner sc = new Scanner(System.in);
	static long a, b, tmp, max, min, mod, x, y;

	public static void main(String[] args) {
		
		while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		}
	}
	
	public static boolean read(){
		if(!sc.hasNext()) return false;
			
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		}
		
		return true;
	}
	
	public static void solve_max(){
		
		x = a;
		y = b;
		
		while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		}
		
		max = y;
	}
	
	public static void solve_min(){
		min = (a * b) / max;
	}

} public class Main{
	
	static Scanner sc = new Scanner(System.in);
	static long a, b, tmp, max, min, mod, x, y;

	public static void main(String[] args) {
		
		while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		}
	}
	
	public static boolean read(){
		if(!sc.hasNext()) return false;
			
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		}
		
		return true;
	}
	
	public static void solve_max(){
		
		x = a;
		y = b;
		
		while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		}
		
		max = y;
	}
	
	public static void solve_min(){
		min = (a * b) / max;
	}

} Main
import java.util.Scanner;


public class Main{
	
	static Scanner sc = new Scanner(System.in);
	static long a, b, tmp, max, min, mod, x, y;

	public static void main(String[] args) {
		
		while(read()){
			solve_max();
			solve_min();
			System.out.println(max + " " + min);
		}
	}
	
	public static boolean read(){
		if(!sc.hasNext()) return false;
			
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a < b){
			tmp = a;
			a = b;
			b = tmp;
		}
		
		return true;
	}
	
	public static void solve_max(){
		
		x = a;
		y = b;
		
		while((mod = (x % y)) != 0){
			x = y;
			y = mod;
		}
		
		max = y;
	}
	
	public static void solve_min(){
		min = (a * b) / max;
	}

}