import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] x = new int[2];
		int gcd = 1;
		int lcm;
		int temp;
		while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * 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);
		int[] x = new int[2];
		int gcd = 1;
		int lcm;
		int temp;
		while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] x = new int[2];
		int gcd = 1;
		int lcm;
		int temp;
		while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int[] x = new int[2];
		int gcd = 1;
		int lcm;
		int temp;
		while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] x = new int[2]; x new int[2] 2 int gcd = 1; gcd 1 int lcm; lcm int temp; temp while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * gcd;
			System.out.println(gcd + " " + lcm);
		} scan.hasNext() scan.hasNext scan {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * gcd;
			System.out.println(gcd + " " + lcm);
		} for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			} int i = 0; int i = 0; i 0 i < x.length i x.length x x.length i++ i++ i {
				x[i] = scan.nextInt();
			} {
				x[i] = scan.nextInt();
			} x[i] = scan.nextInt() x[i] x i scan.nextInt() scan.nextInt scan if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			} x[0] > x[1] x[0] x 0 x[1] x 1 {
				temp = x[1];
			} temp = x[1] temp x[1] x 1 {
				temp = x[0];
			} temp = x[0] temp x[0] x 0 for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			} int i = 1; int i = 1; i 1 i <= temp i temp i++ i++ i {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			} {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			} if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				} x[0] % i == 0 && x[1] % i == 0 x[0] % i == 0 x[0] % i x[0] x 0 i 0 x[1] % i == 0 x[1] % i x[1] x 1 i 0 {
					gcd = i;
				} gcd = i gcd i x[0] /= gcd x[0] x 0 gcd x[1] /= gcd x[1] x 1 gcd lcm = x[0] * x[1] * gcd lcm x[0] * x[1] * gcd x[0] * x[1] * gcd x[0] x 0 x[1] x 1 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);
		int[] x = new int[2];
		int gcd = 1;
		int lcm;
		int temp;
		while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	}
} public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] x = new int[2];
		int gcd = 1;
		int lcm;
		int temp;
		while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * 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);
		int[] x = new int[2];
		int gcd = 1;
		int lcm;
		int temp;
		while (scan.hasNext()) {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
			}
			if (x[0] > x[1]) {
				temp = x[1];
			} else {
				temp = x[0];
			}
			for (int i = 1; i <= temp; i++) {
				if (x[0] % i == 0 && x[1] % i == 0) {
					gcd = i;
				}
			}
			x[0] /= gcd;
			x[1] /= gcd;
			lcm = x[0] * x[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	}
}