import java.util.Scanner;

public class Main {
	
	private static long commonDivisor(long a, long b){
		long r = a%b;
		if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b));
	}

	private static long commonMultiple(long a, long b){
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		long i = 1;
		while(true){
			if(max*i%min==0)
				break;
			i++;
		}
		return max*i;
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a, b, c;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	
	private static long commonDivisor(long a, long b){
		long r = a%b;
		if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b));
	}

	private static long commonMultiple(long a, long b){
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		long i = 1;
		while(true){
			if(max*i%min==0)
				break;
			i++;
		}
		return max*i;
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a, b, c;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		}
	}
} Main private static long commonDivisor(long a, long b){
		long r = a%b;
		if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b));
	} commonDivisor {
		long r = a%b;
		if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b));
	} long r = a%b; r a%b a b if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b)); r==0 r 0 return b; b return commonDivisor(Math.max(r, b), Math.min(r, b)); commonDivisor(Math.max(r, b), Math.min(r, b)) commonDivisor Math.max(r, b) Math.max Math r b Math.min(r, b) Math.min Math r b long a a long b b private static long commonMultiple(long a, long b){
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		long i = 1;
		while(true){
			if(max*i%min==0)
				break;
			i++;
		}
		return max*i;
	} commonMultiple {
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		long i = 1;
		while(true){
			if(max*i%min==0)
				break;
			i++;
		}
		return max*i;
	} long max = Math.max(a, b); max Math.max(a, b) Math.max Math a b long min = Math.min(a, b); min Math.min(a, b) Math.min Math a b long i = 1; i 1 while(true){
			if(max*i%min==0)
				break;
			i++;
		} true {
			if(max*i%min==0)
				break;
			i++;
		} if(max*i%min==0)
				break; max*i%min==0 max*i%min max*i max i min 0 break; i++ i return max*i; max*i max i long a a long b b public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a, b, c;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		}
	} main {
		Scanner scan = new Scanner(System.in);
		long a, b, c;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a a b b c; c while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		} scan.hasNext() scan.hasNext scan {
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		} a = scan.nextInt() a scan.nextInt() scan.nextInt scan b = scan.nextInt() b scan.nextInt() scan.nextInt scan if(b>a){
				c = a;
				a = b;
				b = c;
			} b>a b a {
				c = a;
				a = b;
				b = c;
			} c = a c a a = b a b b = c b c System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n") System.out.print System.out System System.out commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n" commonMultiple(a,b) commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n" commonDivisor(a,b) commonDivisor a b " " commonMultiple(a,b) commonMultiple a b "\n" String[] args args public class Main {
	
	private static long commonDivisor(long a, long b){
		long r = a%b;
		if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b));
	}

	private static long commonMultiple(long a, long b){
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		long i = 1;
		while(true){
			if(max*i%min==0)
				break;
			i++;
		}
		return max*i;
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a, b, c;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		}
	}
} public class Main {
	
	private static long commonDivisor(long a, long b){
		long r = a%b;
		if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b));
	}

	private static long commonMultiple(long a, long b){
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		long i = 1;
		while(true){
			if(max*i%min==0)
				break;
			i++;
		}
		return max*i;
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a, b, c;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	
	private static long commonDivisor(long a, long b){
		long r = a%b;
		if(r==0) return b;
		else return commonDivisor(Math.max(r, b), Math.min(r, b));
	}

	private static long commonMultiple(long a, long b){
		long max = Math.max(a, b);
		long min = Math.min(a, b);
		long i = 1;
		while(true){
			if(max*i%min==0)
				break;
			i++;
		}
		return max*i;
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a, b, c;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(b>a){
				c = a;
				a = b;
				b = c;
			}
			System.out.print(commonDivisor(a,b)+" "+commonMultiple(a,b)+"\n");
		}
	}
}