import java.util.Scanner;
import java.util.Arrays;

class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while( scan.hasNextInt() ) {
			Integer[] ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();
			
			Arrays.sort(ary);
			
			int divisor = 0, temp = 0;
			long multiple = 0;
			
			if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			}
			
			multiple = (ary[0] * (long)ary[1]) / divisor;
			
			
			System.out.println(divisor + " " + multiple);
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while( scan.hasNextInt() ) {
			Integer[] ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();
			
			Arrays.sort(ary);
			
			int divisor = 0, temp = 0;
			long multiple = 0;
			
			if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			}
			
			multiple = (ary[0] * (long)ary[1]) / divisor;
			
			
			System.out.println(divisor + " " + multiple);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while( scan.hasNextInt() ) {
			Integer[] ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();
			
			Arrays.sort(ary);
			
			int divisor = 0, temp = 0;
			long multiple = 0;
			
			if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			}
			
			multiple = (ary[0] * (long)ary[1]) / divisor;
			
			
			System.out.println(divisor + " " + multiple);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		
		while( scan.hasNextInt() ) {
			Integer[] ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();
			
			Arrays.sort(ary);
			
			int divisor = 0, temp = 0;
			long multiple = 0;
			
			if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			}
			
			multiple = (ary[0] * (long)ary[1]) / divisor;
			
			
			System.out.println(divisor + " " + multiple);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while( scan.hasNextInt() ) {
			Integer[] ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();
			
			Arrays.sort(ary);
			
			int divisor = 0, temp = 0;
			long multiple = 0;
			
			if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			}
			
			multiple = (ary[0] * (long)ary[1]) / divisor;
			
			
			System.out.println(divisor + " " + multiple);
		} scan.hasNextInt() scan.hasNextInt scan {
			Integer[] ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();
			
			Arrays.sort(ary);
			
			int divisor = 0, temp = 0;
			long multiple = 0;
			
			if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			}
			
			multiple = (ary[0] * (long)ary[1]) / divisor;
			
			
			System.out.println(divisor + " " + multiple);
		} Integer[] ary = new Integer[2]; ary new Integer[2] 2 ary[0] = scan.nextInt() ary[0] ary 0 scan.nextInt() scan.nextInt scan ary[1] = scan.nextInt() ary[1] ary 1 scan.nextInt() scan.nextInt scan Arrays.sort(ary) Arrays.sort Arrays ary int divisor = 0 divisor 0 temp = 0; temp 0 long multiple = 0; multiple 0 if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			} ary[0] != 0 ary[0] ary 0 0 {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			} int m = ary[1]; m ary[1] ary 1 int n = ary[0]; n ary[0] ary 0 while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				} true {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				} if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					} m % n != 0 m % n m n 0 {
						temp = n;
						n = m % n;
						m = temp;
					} temp = n temp n n = m % n n m % n m n m = temp m temp if(m % n == 0){
						divisor = n;
						break;
					} m % n == 0 m % n m n 0 {
						divisor = n;
						break;
					} divisor = n divisor n break; {
				divisor = ary[1];
			} divisor = ary[1] divisor ary[1] ary 1 multiple = (ary[0] * (long)ary[1]) / divisor multiple (ary[0] * (long)ary[1]) / divisor (ary[0] * (long)ary[1]) ary[0] ary 0 (long)ary[1] ary 1 divisor System.out.println(divisor + " " + multiple) System.out.println System.out System System.out divisor + " " + multiple divisor + " " + multiple divisor " " multiple String[] args args
import java.util.Scanner;
import java.util.Arrays;

class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		while( scan.hasNextInt() ) {
			Integer[] ary = new Integer[2];
			ary[0] = scan.nextInt();
			ary[1] = scan.nextInt();
			
			Arrays.sort(ary);
			
			int divisor = 0, temp = 0;
			long multiple = 0;
			
			if(ary[0] != 0) {
				int m = ary[1];
				int n = ary[0];
				
				while(true) {
					if(m % n != 0) {
						temp = n;
						n = m % n;
						m = temp;
					}
					
					else if(m % n == 0){
						divisor = n;
						break;
					}
				}
			}
			
			else {
				divisor = ary[1];
			}
			
			multiple = (ary[0] * (long)ary[1]) / divisor;
			
			
			System.out.println(divisor + " " + multiple);
		}
	}
}