import java.util.Scanner;
public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Main me = new Main();
		while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		}
	}
	private long GCD(long a,long b){
		if(b == 0)
			return a;
		else
			return GCD(b,a%b);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Main me = new Main();
		while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		}
	}
	private 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 in = new Scanner(System.in);
		Main me = new Main();
		while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		}
	} main {
		Scanner in = new Scanner(System.in);
		Main me = new Main();
		while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) Main me = new Main(); me new Main() while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		} in.hasNext() in.hasNext in {
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		} long a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt(); b in.nextInt() in.nextInt in long gcd = me.GCD(a,b); gcd me.GCD(a,b) me.GCD me a b System.out.printf("%d %d\n",gcd,a*b/gcd) System.out.printf System.out System System.out "%d %d\n" gcd a*b/gcd a*b a b gcd String[] args args private 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 in = new Scanner(System.in);
		Main me = new Main();
		while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		}
	}
	private 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 in = new Scanner(System.in);
		Main me = new Main();
		while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		}
	}
	private long GCD(long a,long b){
		if(b == 0)
			return a;
		else
			return GCD(b,a%b);
	}
} Main
import java.util.Scanner;
public class Main {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Main me = new Main();
		while(in.hasNext()){
			long a = in.nextInt(),b = in.nextInt();
			long gcd = me.GCD(a,b);
			System.out.printf("%d %d\n",gcd,a*b/gcd);
			
		}
	}
	private long GCD(long a,long b){
		if(b == 0)
			return a;
		else
			return GCD(b,a%b);
	}
}