import java.util.*;
public class Main{
	public static void main(String[] args){
	Scanner sc= new Scanner (System.in);
	while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	}
}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
	Scanner sc= new Scanner (System.in);
	while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	}
}
} Main public static void main(String[] args){
	Scanner sc= new Scanner (System.in);
	while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	}
} main {
	Scanner sc= new Scanner (System.in);
	while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	}
} Scanner sc= new Scanner (System.in); sc new Scanner (System.in) while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	} sc.hasNext() sc.hasNext sc {
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	} long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long r = 0; r 0 long temp = 0; temp 0 long LCM = 0; LCM 0 LCM = a * b LCM a * b a b if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		} a < b a b {
			temp = a;
			a = b;
			b = temp;	
		} temp = a temp a a = b a b b = temp b temp for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	} r = a % b; r = a % b r a % b a b r!=0 r 0 {
		temp = r;
		r = b % r;
		b = temp;
	} {
		temp = r;
		r = b % r;
		b = temp;
	} temp = r temp r r = b % r r b % r b r b = temp b temp LCM = LCM / b LCM LCM / b LCM b System.out.println(b +" "+ LCM) System.out.println System.out System System.out b +" "+ LCM b +" "+ LCM b " " LCM String[] args args public class Main{
	public static void main(String[] args){
	Scanner sc= new Scanner (System.in);
	while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	}
}
} public class Main{
	public static void main(String[] args){
	Scanner sc= new Scanner (System.in);
	while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	}
}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
	Scanner sc= new Scanner (System.in);
	while(sc.hasNext()){
	long a = sc.nextLong();
		long b = sc.nextLong();
		long r = 0;
		long temp = 0;
		long LCM = 0;
		LCM = a * b;
		if ( a < b){
			temp = a;
			a = b;
			b = temp;	
		}
	for( r = a % b; r!=0;){
		temp = r;
		r = b % r;
		b = temp;
	}
	LCM = LCM / b; 
	System.out.println(b +" "+ LCM);
	}
}
}