import java.util.Scanner;

public class Main {

	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		}
	}
		
}
				 import java.util.Scanner; Scanner java.util public class Main {

	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		}
	}
		
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		}
	} main {
		Scanner in = new Scanner(System.in);
		
		while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		} in.hasNextInt()==true in.hasNextInt() in.hasNextInt in true {
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		} int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in int l=n; l n int k=m; k m int r=0; r 0 if(m>n){
				r=n;
				n=m;
				m=r;
			} m>n m n {
				r=n;
				n=m;
				m=r;
			} r=n r n n=m n m m=r m r while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				} m!=0 m 0 {
				n=n%m;
				r=n;
				n=m;
				m=r;
				} n=n%m n n%m n m r=n r n n=m n m m=r m r System.out.print(n+" ") System.out.print System.out System System.out n+" " n " " System.out.println(l/n*k) System.out.println System.out System System.out l/n*k l/n l n k String[] args args public class Main {

	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		}
	}
		
} public class Main {

	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		}
	}
		
} Main
import java.util.Scanner;

public class Main {

	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		while(in.hasNextInt()==true){
			int n = in.nextInt();
			int m = in.nextInt();
			int l=n;
			int k=m;
			int r=0;
			if(m>n){
				r=n;
				n=m;
				m=r;
			}
			while(m!=0){
				n=n%m;
				r=n;
				n=m;
				m=r;
				}
			System.out.print(n+" ");
			System.out.println(l/n*k);
		}
	}
		
}
				