import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		}			
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		}			
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		}			
	} main {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		}			
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		} scan.hasNext() scan.hasNext scan {
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		} long a = scan.nextLong(); a scan.nextLong() scan.nextLong scan long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan long max = Math.max(a, b); max Math.max(a, b) Math.max Math a b long min = Math.min(a, b); min Math.min(a, b) Math.min Math a b long yakusu = 0; yakusu 0 long cal = 0; cal 0 for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			} ; true {
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			} {
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			} cal = max % min cal max % min max min max = min max min min = cal min cal if(min==0){ 
					yakusu = max;
					break;
				} min==0 min 0 { 
					yakusu = max;
					break;
				} yakusu = max yakusu max break; long baisu = 0; baisu 0 baisu = a * b / yakusu baisu a * b / yakusu a * b a b yakusu System.out.println(yakusu+" "+baisu) System.out.println System.out System System.out yakusu+" "+baisu yakusu+" "+baisu yakusu " " baisu String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		}			
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		}			
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			long max = Math.max(a, b);
			long min = Math.min(a, b);
			
			long yakusu = 0;
			long cal = 0;
			
			for(;true;){
				cal = max % min;
				max = min;
				min = cal;
				
				if(min==0){ 
					yakusu = max;
					break;
				}
			}
			
			long baisu = 0;
			baisu = a * b / yakusu;
			
			System.out.println(yakusu+" "+baisu);
		}			
	}
}