import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		long n, m, k;

		Scanner in = new Scanner(System.in);

		while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		}
	}

	private static long gcd(long n,long m){

		if(m==0) return n;
		else return gcd(m, n%m);
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		long n, m, k;

		Scanner in = new Scanner(System.in);

		while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		}
	}

	private static long gcd(long n,long m){

		if(m==0) return n;
		else return gcd(m, n%m);
		
	}

} Main public static void main(String[] args) {
		long n, m, k;

		Scanner in = new Scanner(System.in);

		while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		}
	} main {
		long n, m, k;

		Scanner in = new Scanner(System.in);

		while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		}
	} long n n m m k; k Scanner in = new Scanner(System.in); in new Scanner(System.in) while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		} in.hasNext() in.hasNext in {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		} n = in.nextInt() n in.nextInt() in.nextInt in m = in.nextInt() m in.nextInt() in.nextInt in k=Math.max(n, m) k Math.max(n, m) Math.max Math n m m=Math.min(n, m) m Math.min(n, m) Math.min Math n m n=k n k System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m)) System.out.println System.out System System.out gcd(n, m) + " "
					+ (n * m) / gcd(n, m) gcd(n, m) + " "
					+ (n * m) / gcd(n, m) gcd(n, m) gcd n m " " (n * m) / gcd(n, m) (n * m) n m gcd(n, m) gcd n m String[] args args private static long gcd(long n,long m){

		if(m==0) return n;
		else return gcd(m, n%m);
		
	} gcd {

		if(m==0) return n;
		else return gcd(m, n%m);
		
	} if(m==0) return n;
		else return gcd(m, n%m); m==0 m 0 return n; n return gcd(m, n%m); gcd(m, n%m) gcd m n%m n m long n n long m m public class Main {

	public static void main(String[] args) {
		long n, m, k;

		Scanner in = new Scanner(System.in);

		while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		}
	}

	private static long gcd(long n,long m){

		if(m==0) return n;
		else return gcd(m, n%m);
		
	}

} public class Main {

	public static void main(String[] args) {
		long n, m, k;

		Scanner in = new Scanner(System.in);

		while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		}
	}

	private static long gcd(long n,long m){

		if(m==0) return n;
		else return gcd(m, n%m);
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		long n, m, k;

		Scanner in = new Scanner(System.in);

		while (in.hasNext()) {
			n = in.nextInt();
			m = in.nextInt();

			k=Math.max(n, m);
			m=Math.min(n, m);
			n=k;
				
			System.out.println(gcd(n, m) + " "
					+ (n * m) / gcd(n, m));
		}
	}

	private static long gcd(long n,long m){

		if(m==0) return n;
		else return gcd(m, n%m);
		
	}

}