import java.util.Arrays;
import java.util.Scanner;


public class Main {
	
	
	long gcd(long a, long b){
		return a==0 ? b : gcd(b%a, a);
	}
	
	long lcm(long a, long b){
		return a*b / gcd(a, b);
	}
	
	void io(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	
	public static void main(String[] args) {
		new Main().io();
	}
	
	void debug(Object... os){
		System.out.println(Arrays.deepToString(os));
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	
	
	long gcd(long a, long b){
		return a==0 ? b : gcd(b%a, a);
	}
	
	long lcm(long a, long b){
		return a*b / gcd(a, b);
	}
	
	void io(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	
	public static void main(String[] args) {
		new Main().io();
	}
	
	void debug(Object... os){
		System.out.println(Arrays.deepToString(os));
	}
} Main long gcd(long a, long b){
		return a==0 ? b : gcd(b%a, a);
	} gcd {
		return a==0 ? b : gcd(b%a, a);
	} return a==0 ? b : gcd(b%a, a); a==0 ? b : gcd(b%a, a) a==0 a 0 b gcd(b%a, a) gcd b%a b a a long a a long b b long lcm(long a, long b){
		return a*b / gcd(a, b);
	} lcm {
		return a*b / gcd(a, b);
	} return a*b / gcd(a, b); a*b / gcd(a, b) a*b a b gcd(a, b) gcd a b long a a long b b void io(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	} io {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		} sc.hasNext() sc.hasNext sc {
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		} final long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc final long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc System.out.println(gcd(a, b) + " " + lcm(a, b)) System.out.println System.out System System.out gcd(a, b) + " " + lcm(a, b) gcd(a, b) + " " + lcm(a, b) gcd(a, b) gcd a b " " lcm(a, b) lcm a b public static void main(String[] args) {
		new Main().io();
	} main {
		new Main().io();
	} new Main().io() new Main().io new Main() String[] args args void debug(Object... os){
		System.out.println(Arrays.deepToString(os));
	} debug {
		System.out.println(Arrays.deepToString(os));
	} System.out.println(Arrays.deepToString(os)) System.out.println System.out System System.out Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os public class Main {
	
	
	long gcd(long a, long b){
		return a==0 ? b : gcd(b%a, a);
	}
	
	long lcm(long a, long b){
		return a*b / gcd(a, b);
	}
	
	void io(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	
	public static void main(String[] args) {
		new Main().io();
	}
	
	void debug(Object... os){
		System.out.println(Arrays.deepToString(os));
	}
} public class Main {
	
	
	long gcd(long a, long b){
		return a==0 ? b : gcd(b%a, a);
	}
	
	long lcm(long a, long b){
		return a*b / gcd(a, b);
	}
	
	void io(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	
	public static void main(String[] args) {
		new Main().io();
	}
	
	void debug(Object... os){
		System.out.println(Arrays.deepToString(os));
	}
} Main
import java.util.Arrays;
import java.util.Scanner;


public class Main {
	
	
	long gcd(long a, long b){
		return a==0 ? b : gcd(b%a, a);
	}
	
	long lcm(long a, long b){
		return a*b / gcd(a, b);
	}
	
	void io(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			final long a = sc.nextInt();  final long b = sc.nextInt();
			System.out.println(gcd(a, b) + " " + lcm(a, b));
		}
	}
	
	public static void main(String[] args) {
		new Main().io();
	}
	
	void debug(Object... os){
		System.out.println(Arrays.deepToString(os));
	}
}