import java.util.Scanner;publicclassMain{publicstaticvoidmain(String[]args){
Scanner scan =newScanner(System.in);int a = scan.nextInt();int b = scan.nextInt();Max_Min(a,b);}publicstaticvoidMax_Min(int a,int b){int i = a;int j = b;int x =0,y =0;if(a < b){
x = b;
b = a;
a = x;}while(b !=0){
y = a % b;
a = b;
b = y;}//最小公倍数int t = i * j / a;
System.out.println(a);
System.out.println(t);}}