import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.math.*; math.* java import java.io.*; io.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Arrays.*; public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} Main Scanner sc; sc static final int INF=1<<28; INF 1<<28 1 28 static final double EPS=1e-9; EPS 1e-9 void run(){
		sc=new Scanner(System.in);
		for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		}
		sc.close();
	} run {
		sc=new Scanner(System.in);
		for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		}
		sc.close();
	} sc=new Scanner(System.in) sc new Scanner(System.in) for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		} ; {
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		} {
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		} if(!sc.hasNext())
				break; !sc.hasNext() sc.hasNext() sc.hasNext sc break; BigInteger a=sc.nextBigInteger(); a sc.nextBigInteger() sc.nextBigInteger sc BigInteger b=sc.nextBigInteger(); b sc.nextBigInteger() sc.nextBigInteger sc BigInteger gcd=a.gcd(b); gcd a.gcd(b) a.gcd a b BigInteger lcm=a.multiply(b).divide(gcd); lcm a.multiply(b).divide(gcd) a.multiply(b).divide a.multiply(b) a.multiply a b gcd println(gcd+" "+lcm) println gcd+" "+lcm gcd+" "+lcm gcd " " lcm sc.close() sc.close sc void print(String s){
		System.out.print(s);
	} print {
		System.out.print(s);
	} System.out.print(s) System.out.print System.out System System.out s String s s void println(String s){
		System.out.println(s);
	} println {
		System.out.println(s);
	} System.out.println(s) System.out.println System.out System System.out s String s s public static void main(String[] args){
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} Main
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		for(;;){
			if(!sc.hasNext())
				break;
			BigInteger a=sc.nextBigInteger();
			BigInteger b=sc.nextBigInteger();
			BigInteger gcd=a.gcd(b);
			BigInteger lcm=a.multiply(b).divide(gcd);
			println(gcd+" "+lcm);
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
}