import java.util.*;

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

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