
import java.util.Scanner;

class Main {
	Scanner sc = new Scanner(System.in);

	public long gcd(long a,long b){
		return b==0?a:gcd(b,a%b);
	}
	
	public void run() {
		while(sc.hasNext()){
			long a=sc.nextInt(),b=sc.nextInt();
			long g=gcd(a,b);
			ln(g+" "+ a*b/g);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	public static void pr(Object o) {
		System.out.print(o);
	}

	public static void ln(Object o) {
		System.out.println(o);
	}

	public static void ln() {
		System.out.println();
	}
} import java.util.Scanner; Scanner java.util class Main {
	Scanner sc = new Scanner(System.in);

	public long gcd(long a,long b){
		return b==0?a:gcd(b,a%b);
	}
	
	public void run() {
		while(sc.hasNext()){
			long a=sc.nextInt(),b=sc.nextInt();
			long g=gcd(a,b);
			ln(g+" "+ a*b/g);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	public static void pr(Object o) {
		System.out.print(o);
	}

	public static void ln(Object o) {
		System.out.println(o);
	}

	public static void ln() {
		System.out.println();
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public long gcd(long a,long b){
		return b==0?a:gcd(b,a%b);
	} gcd {
		return b==0?a:gcd(b,a%b);
	} return b==0?a:gcd(b,a%b); b==0?a:gcd(b,a%b) b==0 b 0 a gcd(b,a%b) gcd b a%b a b long a a long b b public void run() {
		while(sc.hasNext()){
			long a=sc.nextInt(),b=sc.nextInt();
			long g=gcd(a,b);
			ln(g+" "+ a*b/g);
		}
	} run {
		while(sc.hasNext()){
			long a=sc.nextInt(),b=sc.nextInt();
			long g=gcd(a,b);
			ln(g+" "+ a*b/g);
		}
	} while(sc.hasNext()){
			long a=sc.nextInt(),b=sc.nextInt();
			long g=gcd(a,b);
			ln(g+" "+ a*b/g);
		} sc.hasNext() sc.hasNext sc {
			long a=sc.nextInt(),b=sc.nextInt();
			long g=gcd(a,b);
			ln(g+" "+ a*b/g);
		} long a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt(); b sc.nextInt() sc.nextInt sc long g=gcd(a,b); g gcd(a,b) gcd a b ln(g+" "+ a*b/g) ln g+" "+ a*b/g g+" "+ a*b/g g " " a*b/g a*b a b g public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public static void pr(Object o) {
		System.out.print(o);
	} pr {
		System.out.print(o);
	} System.out.print(o) System.out.print System.out System System.out o Object o o public static void ln(Object o) {
		System.out.println(o);
	} ln {
		System.out.println(o);
	} System.out.println(o) System.out.println System.out System System.out o Object o o public static void ln() {
		System.out.println();
	} ln {
		System.out.println();
	} System.out.println() System.out.println System.out System System.out

import java.util.Scanner;

class Main {
	Scanner sc = new Scanner(System.in);

	public long gcd(long a,long b){
		return b==0?a:gcd(b,a%b);
	}
	
	public void run() {
		while(sc.hasNext()){
			long a=sc.nextInt(),b=sc.nextInt();
			long g=gcd(a,b);
			ln(g+" "+ a*b/g);
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	public static void pr(Object o) {
		System.out.print(o);
	}

	public static void ln(Object o) {
		System.out.println(o);
	}

	public static void ln() {
		System.out.println();
	}
}