import java.io.*;
import java.util.*;
import java.math.*;


public class Main
{

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 static void main(String args[]) throws Exception
       {
       	Scanner cin = new Scanner(System.in);
       	while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	}

}
} import java.io.*; io.* java import java.util.*; util.* java import java.math.*; math.* java public class Main
{

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 static void main(String args[]) throws Exception
       {
       	Scanner cin = new Scanner(System.in);
       	while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	}

}
} Main 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 static void main(String args[]) throws Exception
       {
       	Scanner cin = new Scanner(System.in);
       	while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	}

} main {
       	Scanner cin = new Scanner(System.in);
       	while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	}

} Scanner cin = new Scanner(System.in); cin new Scanner(System.in) while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	} cin.hasNext() cin.hasNext cin {
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	} long a = cin.nextLong(); a cin.nextLong() cin.nextLong cin long b = cin.nextLong(); b cin.nextLong() cin.nextLong cin System.out.println( GCD(a, b) + " " + LCM(a, b)) System.out.println System.out System System.out GCD(a, b) + " " + LCM(a, b) GCD(a, b) + " " + LCM(a, b) GCD(a, b) GCD a b " " LCM(a, b) LCM a b String args[] args public class Main
{

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 static void main(String args[]) throws Exception
       {
       	Scanner cin = new Scanner(System.in);
       	while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	}

}
} public class Main
{

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 static void main(String args[]) throws Exception
       {
       	Scanner cin = new Scanner(System.in);
       	while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	}

}
} Main
import java.io.*;
import java.util.*;
import java.math.*;


public class Main
{

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 static void main(String args[]) throws Exception
       {
       	Scanner cin = new Scanner(System.in);
       	while(cin.hasNext()){
       		long a = cin.nextLong();
       		long b = cin.nextLong();
       		//System.out.println(GCD(a, b));
       		System.out.println( GCD(a, b) + " " + LCM(a, b));
       	}

}
}