import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}

} Main public static void main(String[] args) {
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	} main {
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	} Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		} catch (Exception e) {
			// TODO: handle exception
		} Exception e {
			// TODO: handle exception
		} {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			} scan.hasNext() scan.hasNext scan {
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			} BigInteger bigInteger1=new BigInteger(scan.next()); bigInteger1 new BigInteger(scan.next()) BigInteger bigInteger2=new BigInteger(scan.next()); bigInteger2 new BigInteger(scan.next()) BigInteger bigInteger3=bigInteger1.gcd(bigInteger2); bigInteger3 bigInteger1.gcd(bigInteger2) bigInteger1.gcd bigInteger1 bigInteger2 BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3); bigInteger4 bigInteger1.multiply(bigInteger2).divide(bigInteger3) bigInteger1.multiply(bigInteger2).divide bigInteger1.multiply(bigInteger2) bigInteger1.multiply bigInteger1 bigInteger2 bigInteger3 System.out.println(bigInteger3+" "+bigInteger4) System.out.println System.out System System.out bigInteger3+" "+bigInteger4 bigInteger3+" "+bigInteger4 bigInteger3 " " bigInteger4 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		try {
			while(scan.hasNext()){
				BigInteger bigInteger1=new BigInteger(scan.next());
				BigInteger bigInteger2=new BigInteger(scan.next());
				BigInteger bigInteger3=bigInteger1.gcd(bigInteger2);
				BigInteger bigInteger4=bigInteger1.multiply(bigInteger2).divide(bigInteger3);
				System.out.println(bigInteger3+" "+bigInteger4);
				
				
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}

}