import java.util.Scanner;

public class Main {

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long gcd = gcd(a,b);
			System.out.println(gcd + " " + (a*b/gcd));
		}
		
	}
	public static long gcd(long a,long b) {
		while(b!=0) {
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long gcd = gcd(a,b);
			System.out.println(gcd + " " + (a*b/gcd));
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long gcd = gcd(a,b);
			System.out.println(gcd + " " + (a*b/gcd));
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long gcd = gcd(a,b);
			System.out.println(gcd + " " + (a*b/gcd));
		} sc.hasNext() sc.hasNext sc {
			long a = sc.nextInt();
			long b = sc.nextInt();
			long gcd = gcd(a,b);
			System.out.println(gcd + " " + (a*b/gcd));
		} long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long gcd = gcd(a,b); gcd gcd(a,b) gcd a b System.out.println(gcd + " " + (a*b/gcd)) System.out.println System.out System System.out gcd + " " + (a*b/gcd) gcd + " " + (a*b/gcd) gcd " " (a*b/gcd) a*b a b gcd String[] args args public static long gcd(long a,long b) {
		while(b!=0) {
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	} gcd {
		while(b!=0) {
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	} 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 class Main {

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

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

public class Main {

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