import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);

		while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       }

		    scan.close();

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);

		while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       }

		    scan.close();

	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);

		while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       }

		    scan.close();

	} main {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);

		while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       }

		    scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       } scan.hasNext() scan.hasNext scan {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       } String num1 = scan.next(); num1 scan.next() scan.next scan long int1 = Long.parseLong(num1); int1 Long.parseLong(num1) Long.parseLong Long num1 String num2 = scan.next(); num2 scan.next() scan.next scan long int2 = Long.parseLong(num2); int2 Long.parseLong(num2) Long.parseLong Long num2 long a; a long b; b long r; r long lcm; lcm if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    } int1 > int2 int1 int2 {
		    	a = int1;
		    	b = int2;
		    } a = int1 a int1 b = int2 b int2 {
		    	b = int1;
		    	a = int2;
		    } b = int1 b int1 a = int2 a int2 while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    } true {
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    } r = a%b r a%b a b if(r==0){
		    		break;
		    	} r==0 r 0 {
		    		break;
		    	} break; a = b a b b = r b r lcm = int1 * int2 / b lcm int1 * int2 / b int1 * int2 int1 int2 b System.out.println(b+ " " + lcm) System.out.println System.out System System.out b+ " " + lcm b+ " " + lcm b " " lcm scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);

		while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       }

		    scan.close();

	}
} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);

		while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       }

		    scan.close();

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);

		while(scan.hasNext()) {
	        //??\???1
	        String num1 = scan.next();
		 	long int1 = Long.parseLong(num1);
		 	//??\???2
		    String num2 = scan.next();
		    long int2 = Long.parseLong(num2);

		      /*??? ?????????????????????????????? ???
		   ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
		   (1) a ??? b ??§???????????????????????? r ?????\????????????
		   (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
		   (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
		     */
		    long a;
		    long b;
		    long r;
		    long lcm;
		    //a?????????
		    if(int1 > int2){
		    	a = int1;
		    	b = int2;
		    }else{
		    	b = int1;
		    	a = int2;
		    }
		    while(true){
		    	r = a%b;
		    	if(r==0){
		    		break;
		    	}
		    	a = b;
		    	b = r;
		    }

		    //LCM = A*B???GCD
		    lcm = int1 * int2 / b;
		    System.out.println(b+ " " + lcm);
	       }

		    scan.close();

	}
}