import java.util.Scanner;
public class Main{
	static long gcd(long a,long b){
		while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		}
		return a;
	}
	static void lcm(long a,long b,long g){
		System.out.println(g+" "+(a*b/g));
	}
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		}
		scan.close();
	}

} import java.util.Scanner; Scanner java.util public class Main{
	static long gcd(long a,long b){
		while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		}
		return a;
	}
	static void lcm(long a,long b,long g){
		System.out.println(g+" "+(a*b/g));
	}
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		}
		scan.close();
	}

} Main static long gcd(long a,long b){
		while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		}
		return a;
	} gcd {
		while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		}
		return a;
	} while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		} a!=b a b {
			if(a>b)
				a=a-b;
			else
				b=b-a;
		} if(a>b)
				a=a-b;
			else
				b=b-a; a>b a b a=a-b a a-b a b b=b-a b b-a b a return a; a long a a long b b static void lcm(long a,long b,long g){
		System.out.println(g+" "+(a*b/g));
	} lcm {
		System.out.println(g+" "+(a*b/g));
	} System.out.println(g+" "+(a*b/g)) System.out.println System.out System System.out g+" "+(a*b/g) g+" "+(a*b/g) g " " (a*b/g) a*b a b g long a a long b b long g g public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		}
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		}
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		} scan.hasNext() scan.hasNext scan {
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		} long a=scan.nextInt(); a scan.nextInt() scan.nextInt scan long b=scan.nextInt(); b scan.nextInt() scan.nextInt scan long g=0; g 0 g = gcd(a,b) g gcd(a,b) gcd a b lcm(a,b,g) lcm a b g scan.close() scan.close scan String[] args args public class Main{
	static long gcd(long a,long b){
		while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		}
		return a;
	}
	static void lcm(long a,long b,long g){
		System.out.println(g+" "+(a*b/g));
	}
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		}
		scan.close();
	}

} public class Main{
	static long gcd(long a,long b){
		while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		}
		return a;
	}
	static void lcm(long a,long b,long g){
		System.out.println(g+" "+(a*b/g));
	}
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		}
		scan.close();
	}

} Main
import java.util.Scanner;
public class Main{
	static long gcd(long a,long b){
		while(a!=b){
			if(a>b)
				a=a-b;
			else
				b=b-a;
		}
		return a;
	}
	static void lcm(long a,long b,long g){
		System.out.println(g+" "+(a*b/g));
	}
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a=scan.nextInt();
			long b=scan.nextInt();
			long g=0;
			g = gcd(a,b);
			lcm(a,b,g);
		}
		scan.close();
	}

}