import java.util.Scanner;

public class Main {
	public static void main(String[] a){
		Scanner scn = new Scanner(System.in);
		try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		}

	}
	public static long gcd(long alpha,long beta){
		long x = Math.max(alpha,beta);
		long y = Math.min(alpha,beta);
		long z;
		while(y != 0){
			z = y;
			y = x % y;
			x = z;
		}
		return x;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] a){
		Scanner scn = new Scanner(System.in);
		try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		}

	}
	public static long gcd(long alpha,long beta){
		long x = Math.max(alpha,beta);
		long y = Math.min(alpha,beta);
		long z;
		while(y != 0){
			z = y;
			y = x % y;
			x = z;
		}
		return x;
	}
} Main public static void main(String[] a){
		Scanner scn = new Scanner(System.in);
		try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		}

	} main {
		Scanner scn = new Scanner(System.in);
		try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		}

	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		} catch(Exception e){

		} Exception e {

		} {
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		} while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			} true {
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			} long alpha = scn.nextInt(); alpha scn.nextInt() scn.nextInt scn long beta = scn.nextInt(); beta scn.nextInt() scn.nextInt scn long gcd = gcd(alpha,beta); gcd gcd(alpha,beta) gcd alpha beta long lcm = alpha /gcd * beta; lcm alpha /gcd * beta alpha /gcd alpha gcd beta System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] a a public static long gcd(long alpha,long beta){
		long x = Math.max(alpha,beta);
		long y = Math.min(alpha,beta);
		long z;
		while(y != 0){
			z = y;
			y = x % y;
			x = z;
		}
		return x;
	} gcd {
		long x = Math.max(alpha,beta);
		long y = Math.min(alpha,beta);
		long z;
		while(y != 0){
			z = y;
			y = x % y;
			x = z;
		}
		return x;
	} long x = Math.max(alpha,beta); x Math.max(alpha,beta) Math.max Math alpha beta long y = Math.min(alpha,beta); y Math.min(alpha,beta) Math.min Math alpha beta long z; z while(y != 0){
			z = y;
			y = x % y;
			x = z;
		} y != 0 y 0 {
			z = y;
			y = x % y;
			x = z;
		} z = y z y y = x % y y x % y x y x = z x z return x; x long alpha alpha long beta beta public class Main {
	public static void main(String[] a){
		Scanner scn = new Scanner(System.in);
		try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		}

	}
	public static long gcd(long alpha,long beta){
		long x = Math.max(alpha,beta);
		long y = Math.min(alpha,beta);
		long z;
		while(y != 0){
			z = y;
			y = x % y;
			x = z;
		}
		return x;
	}
} public class Main {
	public static void main(String[] a){
		Scanner scn = new Scanner(System.in);
		try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		}

	}
	public static long gcd(long alpha,long beta){
		long x = Math.max(alpha,beta);
		long y = Math.min(alpha,beta);
		long z;
		while(y != 0){
			z = y;
			y = x % y;
			x = z;
		}
		return x;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] a){
		Scanner scn = new Scanner(System.in);
		try{
			while(true){
				long alpha = scn.nextInt();
				long beta = scn.nextInt();
				long gcd = gcd(alpha,beta);
				long lcm = alpha /gcd * beta;
				System.out.println(gcd + " " + lcm);
			}
		}catch(Exception e){

		}

	}
	public static long gcd(long alpha,long beta){
		long x = Math.max(alpha,beta);
		long y = Math.min(alpha,beta);
		long z;
		while(y != 0){
			z = y;
			y = x % y;
			x = z;
		}
		return x;
	}
}