import java.util.Scanner;

//GCD and LCM
public class Main{

	public static long gcd(long a, long b){
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static long gcd(long a, long b){
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		}
	}
} Main public static long gcd(long a, long b){
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	} gcd {
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	} if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		} a < b a b {
			long tmp = a;
			a = b;
			b = tmp;
		} long tmp = a; tmp a a = b a b b = tmp b tmp while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		} b!=0 b 0 {
			long r = a%b;
			a = b;
			b = r;
		} long r = a%b; r a%b a b a = b a b b = r b r return a; a long a a long b b public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long g = gcd(a, b); g gcd(a, b) gcd a b System.out.println(g+" "+a/g*b) System.out.println System.out System System.out g+" "+a/g*b g+" "+a/g*b g " " a/g*b a/g a g b String[] args args public class Main{

	public static long gcd(long a, long b){
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		}
	}
} public class Main{

	public static long gcd(long a, long b){
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		}
	}
} Main
import java.util.Scanner;

//GCD and LCM
public class Main{

	public static long gcd(long a, long b){
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			long g = gcd(a, b);
			System.out.println(g+" "+a/g*b);
		}
	}
}