import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int i;
		int GCD,LCM;
		double[] num = new double[2];
		double[] tmpNum = new double[2];
		double tmp;
		
		while(scan.hasNextInt()){
			for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			}
			
			
			while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			}
			GCD = (int)num[0];
			LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
			
			System.out.println(GCD + " " + LCM);
		}
		
		scan.close();
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int i;
		int GCD,LCM;
		double[] num = new double[2];
		double[] tmpNum = new double[2];
		double tmp;
		
		while(scan.hasNextInt()){
			for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			}
			
			
			while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			}
			GCD = (int)num[0];
			LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
			
			System.out.println(GCD + " " + LCM);
		}
		
		scan.close();
	}
} Main public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int i;
		int GCD,LCM;
		double[] num = new double[2];
		double[] tmpNum = new double[2];
		double tmp;
		
		while(scan.hasNextInt()){
			for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			}
			
			
			while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			}
			GCD = (int)num[0];
			LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
			
			System.out.println(GCD + " " + LCM);
		}
		
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int i;
		int GCD,LCM;
		double[] num = new double[2];
		double[] tmpNum = new double[2];
		double tmp;
		
		while(scan.hasNextInt()){
			for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			}
			
			
			while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			}
			GCD = (int)num[0];
			LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
			
			System.out.println(GCD + " " + LCM);
		}
		
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int i; i int GCD GCD LCM; LCM double[] num = new double[2]; num new double[2] 2 double[] tmpNum = new double[2]; tmpNum new double[2] 2 double tmp; tmp while(scan.hasNextInt()){
			for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			}
			
			
			while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			}
			GCD = (int)num[0];
			LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
			
			System.out.println(GCD + " " + LCM);
		} scan.hasNextInt() scan.hasNextInt scan {
			for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			}
			
			
			while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			}
			GCD = (int)num[0];
			LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
			
			System.out.println(GCD + " " + LCM);
		} for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			} i=0; i=0 i 0 i<2 i 2 i++ i++ i {
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			} {
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			} num[i] = scan.nextInt() num[i] num i scan.nextInt() scan.nextInt scan tmpNum[i] = num[i] tmpNum[i] tmpNum i num[i] num i while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			} num[1] != 0 num[1] num 1 0 {
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			} if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				} num[0] < num[1] num[0] num 0 num[1] num 1 {
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				} tmp = num[0] tmp num[0] num 0 num[0] = num[1] num[0] num 0 num[1] num 1 num[1] = tmp num[1] num 1 tmp tmp = num[0] - num[1] tmp num[0] - num[1] num[0] num 0 num[1] num 1 num[0] = num[1] num[0] num 0 num[1] num 1 num[1] = tmp num[1] num 1 tmp GCD = (int)num[0] GCD (int)num[0] num 0 LCM = (int)((tmpNum[0]*tmpNum[1])/GCD) LCM (int)((tmpNum[0]*tmpNum[1])/GCD) (tmpNum[0]*tmpNum[1]) tmpNum[0] tmpNum 0 tmpNum[1] tmpNum 1 GCD System.out.println(GCD + " " + LCM) System.out.println System.out System System.out GCD + " " + LCM GCD + " " + LCM GCD " " LCM scan.close() scan.close scan String args[] args
import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int i;
		int GCD,LCM;
		double[] num = new double[2];
		double[] tmpNum = new double[2];
		double tmp;
		
		while(scan.hasNextInt()){
			for(i=0;i<2;i++){
				num[i] = scan.nextInt();
				tmpNum[i] = num[i];
			}
			
			
			while(num[1] != 0){
				if(num[0] < num[1]){
					tmp = num[0];
					num[0] = num[1];
					num[1] = tmp;
				}
				
				tmp = num[0] - num[1];
				num[0] = num[1];
				num[1] = tmp;
			}
			GCD = (int)num[0];
			LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
			
			System.out.println(GCD + " " + LCM);
		}
		
		scan.close();
	}
}