import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long i = 1;
			long[][] gcdlcm = new long[2][2];
			gcdlcm[0][0] = scan.nextLong();
			gcdlcm[0][1] = scan.nextLong();
			gcdlcm[1][0] = gcdlcm[0][0];
			gcdlcm[1][1] = gcdlcm[0][1];
			
			while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			}
			System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long i = 1;
			long[][] gcdlcm = new long[2][2];
			gcdlcm[0][0] = scan.nextLong();
			gcdlcm[0][1] = scan.nextLong();
			gcdlcm[1][0] = gcdlcm[0][0];
			gcdlcm[1][1] = gcdlcm[0][1];
			
			while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			}
			System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long i = 1;
			long[][] gcdlcm = new long[2][2];
			gcdlcm[0][0] = scan.nextLong();
			gcdlcm[0][1] = scan.nextLong();
			gcdlcm[1][0] = gcdlcm[0][0];
			gcdlcm[1][1] = gcdlcm[0][1];
			
			while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			}
			System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
		}
	} main {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long i = 1;
			long[][] gcdlcm = new long[2][2];
			gcdlcm[0][0] = scan.nextLong();
			gcdlcm[0][1] = scan.nextLong();
			gcdlcm[1][0] = gcdlcm[0][0];
			gcdlcm[1][1] = gcdlcm[0][1];
			
			while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			}
			System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			long i = 1;
			long[][] gcdlcm = new long[2][2];
			gcdlcm[0][0] = scan.nextLong();
			gcdlcm[0][1] = scan.nextLong();
			gcdlcm[1][0] = gcdlcm[0][0];
			gcdlcm[1][1] = gcdlcm[0][1];
			
			while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			}
			System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
		} scan.hasNext() scan.hasNext scan {
			long i = 1;
			long[][] gcdlcm = new long[2][2];
			gcdlcm[0][0] = scan.nextLong();
			gcdlcm[0][1] = scan.nextLong();
			gcdlcm[1][0] = gcdlcm[0][0];
			gcdlcm[1][1] = gcdlcm[0][1];
			
			while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			}
			System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
		} long i = 1; i 1 long[][] gcdlcm = new long[2][2]; gcdlcm new long[2][2] 2 2 gcdlcm[0][0] = scan.nextLong() gcdlcm[0][0] gcdlcm[0] gcdlcm 0 0 scan.nextLong() scan.nextLong scan gcdlcm[0][1] = scan.nextLong() gcdlcm[0][1] gcdlcm[0] gcdlcm 0 1 scan.nextLong() scan.nextLong scan gcdlcm[1][0] = gcdlcm[0][0] gcdlcm[1][0] gcdlcm[1] gcdlcm 1 0 gcdlcm[0][0] gcdlcm[0] gcdlcm 0 0 gcdlcm[1][1] = gcdlcm[0][1] gcdlcm[1][1] gcdlcm[1] gcdlcm 1 1 gcdlcm[0][1] gcdlcm[0] gcdlcm 0 1 while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			} i != 0 i 0 {
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			} i = gcdlcm[0][0] % gcdlcm[0][1] i gcdlcm[0][0] % gcdlcm[0][1] gcdlcm[0][0] gcdlcm[0] gcdlcm 0 0 gcdlcm[0][1] gcdlcm[0] gcdlcm 0 1 gcdlcm[0][0] = gcdlcm[0][1] gcdlcm[0][0] gcdlcm[0] gcdlcm 0 0 gcdlcm[0][1] gcdlcm[0] gcdlcm 0 1 gcdlcm[0][1] = i gcdlcm[0][1] gcdlcm[0] gcdlcm 0 1 i System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0])) System.out.println System.out System System.out gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]) gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]) gcdlcm[0][0] gcdlcm[0] gcdlcm 0 0 " " (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]) gcdlcm[1][0] * gcdlcm[1][1] gcdlcm[1][0] gcdlcm[1] gcdlcm 1 0 gcdlcm[1][1] gcdlcm[1] gcdlcm 1 1 gcdlcm[0][0] gcdlcm[0] gcdlcm 0 0 String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long i = 1;
			long[][] gcdlcm = new long[2][2];
			gcdlcm[0][0] = scan.nextLong();
			gcdlcm[0][1] = scan.nextLong();
			gcdlcm[1][0] = gcdlcm[0][0];
			gcdlcm[1][1] = gcdlcm[0][1];
			
			while(i != 0){
				i = gcdlcm[0][0] % gcdlcm[0][1];
				gcdlcm[0][0] = gcdlcm[0][1];
				gcdlcm[0][1] = i;
			}
			System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
		}
	}
}