import java.util.Scanner;

class Main {
	public static void main(String[] args){

		Scanner cin = new Scanner(System.in);
		int a;
		int b;
		int g;
		
		while (cin.hasNext()){
			a = cin.nextInt();
			b = cin.nextInt();
			g = GCD(a, b);
			System.out.println(g + " " + a * (b / g));
		}
	}
	
	private static int GCD (int a, int b){
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args){

		Scanner cin = new Scanner(System.in);
		int a;
		int b;
		int g;
		
		while (cin.hasNext()){
			a = cin.nextInt();
			b = cin.nextInt();
			g = GCD(a, b);
			System.out.println(g + " " + a * (b / g));
		}
	}
	
	private static int GCD (int a, int b){
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	}
} Main public static void main(String[] args){

		Scanner cin = new Scanner(System.in);
		int a;
		int b;
		int g;
		
		while (cin.hasNext()){
			a = cin.nextInt();
			b = cin.nextInt();
			g = GCD(a, b);
			System.out.println(g + " " + a * (b / g));
		}
	} main {

		Scanner cin = new Scanner(System.in);
		int a;
		int b;
		int g;
		
		while (cin.hasNext()){
			a = cin.nextInt();
			b = cin.nextInt();
			g = GCD(a, b);
			System.out.println(g + " " + a * (b / g));
		}
	} Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int a; a int b; b int g; g while (cin.hasNext()){
			a = cin.nextInt();
			b = cin.nextInt();
			g = GCD(a, b);
			System.out.println(g + " " + a * (b / g));
		} cin.hasNext() cin.hasNext cin {
			a = cin.nextInt();
			b = cin.nextInt();
			g = GCD(a, b);
			System.out.println(g + " " + a * (b / g));
		} a = cin.nextInt() a cin.nextInt() cin.nextInt cin b = cin.nextInt() b cin.nextInt() cin.nextInt cin g = GCD(a, b) g GCD(a, b) GCD a b System.out.println(g + " " + a * (b / g)) System.out.println System.out System System.out g + " " + a * (b / g) g + " " + a * (b / g) g " " a * (b / g) a (b / g) b g String[] args args private static int GCD (int a, int b){
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	} GCD {
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	} if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		} a % b != 0 a % b a b 0 {
			return (GCD(b, a % b));
		} return (GCD(b, a % b)); (GCD(b, a % b)) GCD b a % b a b {
			return (b);
		} return (b); (b) int a a int b b
import java.util.Scanner;

class Main {
	public static void main(String[] args){

		Scanner cin = new Scanner(System.in);
		int a;
		int b;
		int g;
		
		while (cin.hasNext()){
			a = cin.nextInt();
			b = cin.nextInt();
			g = GCD(a, b);
			System.out.println(g + " " + a * (b / g));
		}
	}
	
	private static int GCD (int a, int b){
		if (a % b != 0){
			return (GCD(b, a % b));
		}
		else {
			return (b);
		}
	}
}