import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
}
}
public static long gcd(long x,long y){
long max=Math.max(x,y);
long min=Math.min(x,y);
long amari=max%min;
if(amari==0){return min;}
else{return gcd(min,amari);}
}
} import java.util.*; util.* java class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
}
}
public static long gcd(long x,long y){
long max=Math.max(x,y);
long min=Math.min(x,y);
long amari=max%min;
if(amari==0){return min;}
else{return gcd(min,amari);}
}
} Main public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
}
} main {
Scanner sc=new Scanner(System.in);
while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
}
} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
} sc.hasNextLong() sc.hasNextLong sc {
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
} long a=sc.nextLong(); a sc.nextLong() sc.nextLong sc long b=sc.nextLong(); b sc.nextLong() sc.nextLong sc long c=gcd(a,b); c gcd(a,b) gcd a b long d=(a*b)/c; d (a*b)/c (a*b) a b c System.out.println(c+" "+d) System.out.println System.out System System.out c+" "+d c+" "+d c " " d String[] args args public static long gcd(long x,long y){
long max=Math.max(x,y);
long min=Math.min(x,y);
long amari=max%min;
if(amari==0){return min;}
else{return gcd(min,amari);}
} gcd {
long max=Math.max(x,y);
long min=Math.min(x,y);
long amari=max%min;
if(amari==0){return min;}
else{return gcd(min,amari);}
} long max=Math.max(x,y); max Math.max(x,y) Math.max Math x y long min=Math.min(x,y); min Math.min(x,y) Math.min Math x y long amari=max%min; amari max%min max min if(amari==0){return min;}
else{return gcd(min,amari);} amari==0 amari 0 {return min;} return min; min {return gcd(min,amari);} return gcd(min,amari); gcd(min,amari) gcd min amari long x x long y y
import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
}
}
public static long gcd(long x,long y){
long max=Math.max(x,y);
long min=Math.min(x,y);
long amari=max%min;
if(amari==0){return min;}
else{return gcd(min,amari);}
}
}