import java.util.Scanner;

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);
			long l = a / g * b;
			System.out.println(g + " " + l);
		}
		sc.close();
	}

}
 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);
			long l = a / g * b;
			System.out.println(g + " " + l);
		}
		sc.close();
	}

} 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);
			long l = a / g * b;
			System.out.println(g + " " + l);
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			long g = gcd(a, b);
			long l = a / g * b;
			System.out.println(g + " " + l);
		}
		sc.close();
	} 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);
			long l = a / g * b;
			System.out.println(g + " " + l);
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			long g = gcd(a, b);
			long l = a / g * b;
			System.out.println(g + " " + l);
		} 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 long l = a / g * b; l a / g * b a / g a g b System.out.println(g + " " + l) System.out.println System.out System System.out g + " " + l g + " " + l g " " l sc.close() sc.close sc 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);
			long l = a / g * b;
			System.out.println(g + " " + l);
		}
		sc.close();
	}

} 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);
			long l = a / g * b;
			System.out.println(g + " " + l);
		}
		sc.close();
	}

} Main
import java.util.Scanner;

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);
			long l = a / g * b;
			System.out.println(g + " " + l);
		}
		sc.close();
	}

}

