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

class Main{

public static void main(String args[]) throws java.io.IOException{
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
long a =scan.nextLong();
long b = scan.nextLong();
System.out.println(gcd(a,b)+" "+(a*b)/gcd(a,b));
}


}
public static long gcd(long a,long b){
if(b==0)return a;
return gcd(b,a%b);
}
} import java.io.*; io.* java import java.util.*; util.* java class Main{

public static void main(String args[]) throws java.io.IOException{
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
long a =scan.nextLong();
long b = scan.nextLong();
System.out.println(gcd(a,b)+" "+(a*b)/gcd(a,b));
}


}
public static long gcd(long a,long b){
if(b==0)return a;
return gcd(b,a%b);
}
} Main public static void main(String args[]) throws java.io.IOException{
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
long a =scan.nextLong();
long b = scan.nextLong();
System.out.println(gcd(a,b)+" "+(a*b)/gcd(a,b));
}


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


} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
long a =scan.nextLong();
long b = scan.nextLong();
System.out.println(gcd(a,b)+" "+(a*b)/gcd(a,b));
} scan.hasNext() scan.hasNext scan {
long a =scan.nextLong();
long b = scan.nextLong();
System.out.println(gcd(a,b)+" "+(a*b)/gcd(a,b));
} long a =scan.nextLong(); a scan.nextLong() scan.nextLong scan long b = scan.nextLong(); b scan.nextLong() scan.nextLong scan System.out.println(gcd(a,b)+" "+(a*b)/gcd(a,b)) System.out.println System.out System System.out gcd(a,b)+" "+(a*b)/gcd(a,b) gcd(a,b)+" "+(a*b)/gcd(a,b) gcd(a,b) gcd a b " " (a*b)/gcd(a,b) (a*b) a b gcd(a,b) gcd a b String args[] args public static long gcd(long a,long b){
if(b==0)return a;
return gcd(b,a%b);
} gcd {
if(b==0)return a;
return gcd(b,a%b);
} if(b==0)return a; 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
import java.io.*;
import java.util.*;

class Main{

public static void main(String args[]) throws java.io.IOException{
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
long a =scan.nextLong();
long b = scan.nextLong();
System.out.println(gcd(a,b)+" "+(a*b)/gcd(a,b));
}


}
public static long gcd(long a,long b){
if(b==0)return a;
return gcd(b,a%b);
}
}