import java.util.Scanner;

public class Main
{
	private static int calcGCD(int a,int b)
	{
		if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		}
	}
	private static int calcLCM(int a,int b)
	{
		int gcd=calcGCD(a,b);
		if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		}
	}
	
	public static void main(String[] args)
	{
		int a,b;
		int gcd,lcm;
		Scanner scan=new Scanner(System.in);
		while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		}
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	private static int calcGCD(int a,int b)
	{
		if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		}
	}
	private static int calcLCM(int a,int b)
	{
		int gcd=calcGCD(a,b);
		if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		}
	}
	
	public static void main(String[] args)
	{
		int a,b;
		int gcd,lcm;
		Scanner scan=new Scanner(System.in);
		while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		}
		scan.close();
	}
} Main private static int calcGCD(int a,int b)
	{
		if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		}
	} calcGCD {
		if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		}
	} if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		} b==0 b 0 {
			return a;
		} return a; a {
			return calcGCD(b,a%b);
		} return calcGCD(b,a%b); calcGCD(b,a%b) calcGCD b a%b a b int a a int b b private static int calcLCM(int a,int b)
	{
		int gcd=calcGCD(a,b);
		if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		}
	} calcLCM {
		int gcd=calcGCD(a,b);
		if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		}
	} int gcd=calcGCD(a,b); gcd calcGCD(a,b) calcGCD a b if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		} a%gcd==0 a%gcd a gcd 0 {
			return (a/gcd)*b;
		} return (a/gcd)*b; (a/gcd)*b (a/gcd) a gcd b {
			return (b/gcd)*a;
		} return (b/gcd)*a; (b/gcd)*a (b/gcd) b gcd a int a a int b b public static void main(String[] args)
	{
		int a,b;
		int gcd,lcm;
		Scanner scan=new Scanner(System.in);
		while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		}
		scan.close();
	} main {
		int a,b;
		int gcd,lcm;
		Scanner scan=new Scanner(System.in);
		while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		}
		scan.close();
	} int a a b; b int gcd gcd lcm; lcm Scanner scan=new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		} scan.hasNext() scan.hasNext scan {
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		} a=scan.nextInt() a scan.nextInt() scan.nextInt scan b=scan.nextInt() b scan.nextInt() scan.nextInt scan gcd=calcGCD(Math.max(a,b),Math.min(a,b)) gcd calcGCD(Math.max(a,b),Math.min(a,b)) calcGCD Math.max(a,b) Math.max Math a b Math.min(a,b) Math.min Math a b lcm=calcLCM(a,b) lcm calcLCM(a,b) calcLCM a b System.out.println(gcd+" "+lcm) System.out.println System.out System System.out gcd+" "+lcm gcd+" "+lcm gcd " " lcm scan.close() scan.close scan String[] args args public class Main
{
	private static int calcGCD(int a,int b)
	{
		if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		}
	}
	private static int calcLCM(int a,int b)
	{
		int gcd=calcGCD(a,b);
		if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		}
	}
	
	public static void main(String[] args)
	{
		int a,b;
		int gcd,lcm;
		Scanner scan=new Scanner(System.in);
		while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		}
		scan.close();
	}
} public class Main
{
	private static int calcGCD(int a,int b)
	{
		if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		}
	}
	private static int calcLCM(int a,int b)
	{
		int gcd=calcGCD(a,b);
		if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		}
	}
	
	public static void main(String[] args)
	{
		int a,b;
		int gcd,lcm;
		Scanner scan=new Scanner(System.in);
		while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		}
		scan.close();
	}
} Main
import java.util.Scanner;

public class Main
{
	private static int calcGCD(int a,int b)
	{
		if(b==0){
			return a;
		}else{
			return calcGCD(b,a%b);
		}
	}
	private static int calcLCM(int a,int b)
	{
		int gcd=calcGCD(a,b);
		if(a%gcd==0){
			return (a/gcd)*b;
		}else{
			return (b/gcd)*a;
		}
	}
	
	public static void main(String[] args)
	{
		int a,b;
		int gcd,lcm;
		Scanner scan=new Scanner(System.in);
		while(scan.hasNext()){
			a=scan.nextInt();
			b=scan.nextInt();
			gcd=calcGCD(Math.max(a,b),Math.min(a,b));
			lcm=calcLCM(a,b);
			System.out.println(gcd+" "+lcm);
		}
		scan.close();
	}
}