import java.util.Scanner;

class Main{

    static double gcd(double a,double b){
	if(b==0) return a;
	else return gcd(b,a%b);
    }
    
    public static void main(String[] args){
	final Scanner sc = new Scanner(System.in);
	while(sc.hasNext()){
	    double a=sc.nextDouble();
	    double b=sc.nextDouble();
	    double g=gcd(a,b);
	    System.out.printf("%.0f %.0f\n",g,(a*b)/g);
	}
    }
} import java.util.Scanner; Scanner java.util class Main{

    static double gcd(double a,double b){
	if(b==0) return a;
	else return gcd(b,a%b);
    }
    
    public static void main(String[] args){
	final Scanner sc = new Scanner(System.in);
	while(sc.hasNext()){
	    double a=sc.nextDouble();
	    double b=sc.nextDouble();
	    double g=gcd(a,b);
	    System.out.printf("%.0f %.0f\n",g,(a*b)/g);
	}
    }
} Main static double gcd(double a,double 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 double a a double b b public static void main(String[] args){
	final Scanner sc = new Scanner(System.in);
	while(sc.hasNext()){
	    double a=sc.nextDouble();
	    double b=sc.nextDouble();
	    double g=gcd(a,b);
	    System.out.printf("%.0f %.0f\n",g,(a*b)/g);
	}
    } main {
	final Scanner sc = new Scanner(System.in);
	while(sc.hasNext()){
	    double a=sc.nextDouble();
	    double b=sc.nextDouble();
	    double g=gcd(a,b);
	    System.out.printf("%.0f %.0f\n",g,(a*b)/g);
	}
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
	    double a=sc.nextDouble();
	    double b=sc.nextDouble();
	    double g=gcd(a,b);
	    System.out.printf("%.0f %.0f\n",g,(a*b)/g);
	} sc.hasNext() sc.hasNext sc {
	    double a=sc.nextDouble();
	    double b=sc.nextDouble();
	    double g=gcd(a,b);
	    System.out.printf("%.0f %.0f\n",g,(a*b)/g);
	} double a=sc.nextDouble(); a sc.nextDouble() sc.nextDouble sc double b=sc.nextDouble(); b sc.nextDouble() sc.nextDouble sc double g=gcd(a,b); g gcd(a,b) gcd a b System.out.printf("%.0f %.0f\n",g,(a*b)/g) System.out.printf System.out System System.out "%.0f %.0f\n" g (a*b)/g (a*b) a b g String[] args args
import java.util.Scanner;

class Main{

    static double gcd(double a,double b){
	if(b==0) return a;
	else return gcd(b,a%b);
    }
    
    public static void main(String[] args){
	final Scanner sc = new Scanner(System.in);
	while(sc.hasNext()){
	    double a=sc.nextDouble();
	    double b=sc.nextDouble();
	    double g=gcd(a,b);
	    System.out.printf("%.0f %.0f\n",g,(a*b)/g);
	}
    }
}