import java.util.*;
public class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long a,b;
	while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	}
    }
    public static long GCD(long a,long b){
	if(b == 0) return a;
	else return GCD(b , a % b);
    }
    public static long LCM(long a,long b){
	return a*b / GCD(a , b);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long a,b;
	while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	}
    }
    public static long GCD(long a,long b){
	if(b == 0) return a;
	else return GCD(b , a % b);
    }
    public static long LCM(long a,long b){
	return a*b / GCD(a , b);
    }
} Main public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long a,b;
	while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	}
    } main {
	Scanner stdIn = new Scanner(System.in);
	long a,b;
	while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	}
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) long a a b; b while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	} stdIn.hasNextInt() stdIn.hasNextInt stdIn {
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	} a = stdIn.nextInt() a stdIn.nextInt() stdIn.nextInt stdIn b = stdIn.nextInt() b stdIn.nextInt() stdIn.nextInt stdIn System.out.printf("%d %d\n",GCD(a , b),LCM(a , b)) System.out.printf System.out System System.out "%d %d\n" GCD(a , b) GCD a b LCM(a , b) LCM a b String[] args args public static long GCD(long a,long b){
	if(b == 0) return a;
	else return GCD(b , a % b);
    } GCD {
	if(b == 0) return a;
	else return GCD(b , a % b);
    } if(b == 0) return a;
	else return GCD(b , a % b); b == 0 b 0 return a; a return GCD(b , a % b); GCD(b , a % b) GCD b a % b a b long a a long b b public static 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 public class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long a,b;
	while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	}
    }
    public static long GCD(long a,long b){
	if(b == 0) return a;
	else return GCD(b , a % b);
    }
    public static long LCM(long a,long b){
	return a*b / GCD(a , b);
    }
} public class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long a,b;
	while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	}
    }
    public static long GCD(long a,long b){
	if(b == 0) return a;
	else return GCD(b , a % b);
    }
    public static long LCM(long a,long b){
	return a*b / GCD(a , b);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
	Scanner stdIn = new Scanner(System.in);
	long a,b;
	while(stdIn.hasNextInt()){
	    a = stdIn.nextInt();
	    b = stdIn.nextInt();
	    System.out.printf("%d %d\n",GCD(a , b),LCM(a , b));
	}
    }
    public static long GCD(long a,long b){
	if(b == 0) return a;
	else return GCD(b , a % b);
    }
    public static long LCM(long a,long b){
	return a*b / GCD(a , b);
    }
}