import java.util.Scanner;

public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		}
		System.exit(0);
	}
	static long gcd(long i ,long j){
		return j == 0 ? i : gcd(j, i % j);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		}
		System.exit(0);
	}
	static long gcd(long i ,long j){
		return j == 0 ? i : gcd(j, i % j);
	}
} Main private static Scanner scan; scan public static void main(String[] args) {
		scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		}
		System.exit(0);
	} main {
		scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		}
		System.exit(0);
	} scan = new Scanner(System.in) scan new Scanner(System.in) while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		} scan.hasNext() scan.hasNext scan {
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		} long a = Long.parseLong(scan.next()); a Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long b = Long.parseLong(scan.next()); b Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan long c = gcd(a,b); c gcd(a,b) gcd a b long d = a*b/c; d a*b/c a*b a b c System.out.println(c+" "+d) System.out.println System.out System System.out c+" "+d c+" "+d c " " d System.exit(0) System.exit System 0 String[] args args static long gcd(long i ,long j){
		return j == 0 ? i : gcd(j, i % j);
	} gcd {
		return j == 0 ? i : gcd(j, i % j);
	} return j == 0 ? i : gcd(j, i % j); j == 0 ? i : gcd(j, i % j) j == 0 j 0 i gcd(j, i % j) gcd j i % j i j long i i long j j public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		}
		System.exit(0);
	}
	static long gcd(long i ,long j){
		return j == 0 ? i : gcd(j, i % j);
	}
} public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		}
		System.exit(0);
	}
	static long gcd(long i ,long j){
		return j == 0 ? i : gcd(j, i % j);
	}
} Main
import java.util.Scanner;

public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		while(scan.hasNext()){
			long a = Long.parseLong(scan.next());
			long b = Long.parseLong(scan.next());
			long c = gcd(a,b);
			long d = a*b/c;
			System.out.println(c+" "+d);
		}
		System.exit(0);
	}
	static long gcd(long i ,long j){
		return j == 0 ? i : gcd(j, i % j);
	}
}