import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		Scanner sc=new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		}
	}
	static 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) {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		Scanner sc=new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		}
	}
	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) {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		Scanner sc=new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		}
	} main {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		Scanner sc=new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		}
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long a a b b g g l; l while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		} sc.hasNext() sc.hasNext sc {
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		} a=sc.nextLong() a sc.nextLong() sc.nextLong sc b=sc.nextLong() b sc.nextLong() sc.nextLong sc if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			} a<b a b {
				g=gcd(a,b);
			} g=gcd(a,b) g gcd(a,b) gcd a b {
				g=gcd(b,a);
			} g=gcd(b,a) g gcd(b,a) gcd b a l=a*b/g l a*b/g a*b a b g System.out.printf("%d %d\n",g,l) System.out.printf System.out System System.out "%d %d\n" g l String[] args args 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;
		} return a; a {
			return gcd(b,a%b);
		} 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) {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		Scanner sc=new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		}
	}
	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) {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		Scanner sc=new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		}
	}
	static 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) {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		Scanner sc=new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext()){
			a=sc.nextLong();
			b=sc.nextLong();
			if(a<b){
				g=gcd(a,b);
			}
			else{
				g=gcd(b,a);
			}
			l=a*b/g;
			System.out.printf("%d %d\n",g,l);
		}
	}
	static long gcd(long a,long b){
		if(b==0){
			return a;
		}
		else{
			return gcd(b,a%b);
		}
	}
	

}