import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		}
	}
} Main public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		}
	} main {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		} in.hasNext() in.hasNext in {
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		} long x = in.nextLong(); x in.nextLong() in.nextLong in long y = in.nextLong(); y in.nextLong() in.nextLong in long mx=x mx x my=y; my y while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			} y!=0 y 0 {
				x = x%y;
				long test=x;
				x = y;
				y = test;
			} x = x%y x x%y x y long test=x; test x x = y x y y = test y test System.out.println(x+" "+(mx/x*my)) System.out.println System.out System System.out x+" "+(mx/x*my) x+" "+(mx/x*my) x " " (mx/x*my) mx/x mx x my String[] args args public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			long x = in.nextLong();
			long y = in.nextLong();
			long mx=x,my=y;
			while(y!=0){
				x = x%y;
				long test=x;
				x = y;
				y = test;
			}
			System.out.println(x+" "+(mx/x*my));
		}
	}
}