import java.math.BigInteger;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		}	
	}	
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		}	
	}	
} Main public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		}	
	} main {
		Scanner s=new Scanner(System.in);
		while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		}	
	} Scanner s=new Scanner(System.in); s new Scanner(System.in) while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		} s.hasNext() s.hasNext s {
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		} BigInteger a = BigInteger.valueOf(s.nextInt()); a BigInteger.valueOf(s.nextInt()) BigInteger.valueOf BigInteger s.nextInt() s.nextInt s BigInteger b = BigInteger.valueOf(s.nextInt()); b BigInteger.valueOf(s.nextInt()) BigInteger.valueOf BigInteger s.nextInt() s.nextInt s BigInteger g = a.gcd(b); g a.gcd(b) a.gcd a b BigInteger l = a.multiply(b).divide(g); l a.multiply(b).divide(g) a.multiply(b).divide a.multiply(b) a.multiply a b g System.out.println(g+" "+l) System.out.println System.out System System.out g+" "+l g+" "+l g " " l String[] args args public class Main {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		}	
	}	
} public class Main {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		}	
	}	
} Main
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		while(s.hasNext()){
			BigInteger a = BigInteger.valueOf(s.nextInt());
			BigInteger b = BigInteger.valueOf(s.nextInt());
			BigInteger g = a.gcd(b);
			BigInteger l = a.multiply(b).divide(g);
			System.out.println(g+" "+l);
		}	
	}	
}