import java.util.Scanner;


public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long num1 num1 num2 num2 gc1 gc1 gc2 gc2 lc1 lc1 lc2; lc2 while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		} sc.hasNextInt() sc.hasNextInt sc {
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		} num1 = sc.nextInt() num1 sc.nextInt() sc.nextInt sc num2 = sc.nextInt() num2 sc.nextInt() sc.nextInt sc if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\??? num1 >= num2 num1 num2 {
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			} gc1 = num1 gc1 num1 gc2 = num2 gc2 num2 lc1 = num1 lc1 num1 lc2 = num2 lc2 num2 {
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			} gc1 = num2 gc1 num2 gc2 = num1 gc2 num1 lc1 = num2 lc1 num2 lc2 = num1 lc2 num1 long GCD GCD LCM; LCM while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			} gc1 % gc2 != 0 gc1 % gc2 gc1 gc2 0 {
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			} GCD = gc1 % gc2 GCD gc1 % gc2 gc1 gc2 gc1 = gc2 gc1 gc2 gc2 = GCD gc2 GCD LCM = (lc1*lc2)/gc2 LCM (lc1*lc2)/gc2 (lc1*lc2) lc1 lc2 gc2 System.out.println(gc2 + " " + LCM) System.out.println System.out System System.out gc2 + " " + LCM gc2 + " " + LCM gc2 " " LCM sc.close() sc.close sc String args[] args public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	}
} Main
import java.util.Scanner;


public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	}
}