import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long[] ab = new long[2];
		long a,b;
		long gcd = 0;
		long lcm = 0;

		while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long[] ab = new long[2];
		long a,b;
		long gcd = 0;
		long lcm = 0;

		while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long[] ab = new long[2];
		long a,b;
		long gcd = 0;
		long lcm = 0;

		while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		long[] ab = new long[2];
		long a,b;
		long gcd = 0;
		long lcm = 0;

		while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long[] ab = new long[2]; ab new long[2] 2 long a a b; b long gcd = 0; gcd 0 long lcm = 0; lcm 0 while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		} (scan.hasNext()) scan.hasNext scan {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		} a = Integer.parseInt(scan.next()) a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan b = Integer.parseInt(scan.next()) b Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan ab[0] = a ab[0] ab 0 a ab[1] = b ab[1] ab 1 b java.util.Arrays.sort(ab) java.util.Arrays.sort java.util.Arrays java.util java java.util java.util.Arrays ab while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			} ab[0] != 0 ab[0] ab 0 0 {
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			} long pool = ab[0]; pool ab[0] ab 0 ab[0] = ab[1] % ab[0] ab[0] ab 0 ab[1] % ab[0] ab[1] ab 1 ab[0] ab 0 ab[1] = pool ab[1] ab 1 pool gcd = ab[1] gcd ab[1] ab 1 lcm = a * b / gcd lcm a * b / gcd a * b a b gcd System.out.println(gcd+" "+lcm) System.out.println System.out System System.out gcd+" "+lcm gcd+" "+lcm gcd " " lcm String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long[] ab = new long[2];
		long a,b;
		long gcd = 0;
		long lcm = 0;

		while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long[] ab = new long[2];
		long a,b;
		long gcd = 0;
		long lcm = 0;

		while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long[] ab = new long[2];
		long a,b;
		long gcd = 0;
		long lcm = 0;

		while ((scan.hasNext())) {
			a = Integer.parseInt(scan.next());
			b = Integer.parseInt(scan.next());

			ab[0] = a;
			ab[1] = b;

			java.util.Arrays.sort(ab);

			while(ab[0] != 0){
				long pool = ab[0];
				ab[0] = ab[1] % ab[0];
				ab[1] = pool;
			}
			gcd = ab[1];


			// Å¬ö{
			lcm = a * b / gcd;
			System.out.println(gcd+" "+lcm);
		}
	}
}