import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    }
	}
	public static long gcd(long a,long b){
		if(b==0)return a;
		else return gcd(b,a%b);
	} 
}
//by TTTMongolia 11/05/2012 import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    }
	}
	public static long gcd(long a,long b){
		if(b==0)return a;
		else return gcd(b,a%b);
	} 
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    }
	} main {
		Scanner sc = new Scanner(System.in);
	    while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    } sc.hasNext() sc.hasNext sc {
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    } long a=sc.nextLong(); a sc.nextLong() sc.nextLong sc long b=sc.nextLong(); b sc.nextLong() sc.nextLong sc System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b) System.out.println System.out System System.out gcd(a,b)+" "+a/gcd(a,b)*b gcd(a,b)+" "+a/gcd(a,b)*b gcd(a,b) gcd a b " " a/gcd(a,b)*b a/gcd(a,b) a gcd(a,b) gcd a b b String[] args args public static long gcd(long a,long b){
		if(b==0)return a;
		else return gcd(b,a%b);
	} gcd {
		if(b==0)return a;
		else return gcd(b,a%b);
	} if(b==0)return a;
		else return gcd(b,a%b); b==0 b 0 return a; a return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b long a a long b b public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    }
	}
	public static long gcd(long a,long b){
		if(b==0)return a;
		else return gcd(b,a%b);
	} 
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    }
	}
	public static long gcd(long a,long b){
		if(b==0)return a;
		else return gcd(b,a%b);
	} 
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    while(sc.hasNext()){
	    	long a=sc.nextLong();
	    	long b=sc.nextLong();
	        System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
	    }
	}
	public static long gcd(long a,long b){
		if(b==0)return a;
		else return gcd(b,a%b);
	} 
}
//by TTTMongolia 11/05/2012