import java.util.Arrays;
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[] y = 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	}
} import java.util.Arrays; Arrays java.util 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[] y = 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[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[] y = 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int[] x = new int[2];
		int[] y = 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[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[] y = new int[2]; y 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[1] * gcd;
			System.out.println(gcd + " " + lcm);
		} scan.hasNext() scan.hasNext scan {
			for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[1] * gcd;
			System.out.println(gcd + " " + lcm);
		} for (int i = 0; i < x.length; i++) {
				x[i] = scan.nextInt();
				y[i]=x[i];
			} int i = 0; int i = 0; i 0 i < x.length i x.length x x.length i++ i++ i {
				x[i] = scan.nextInt();
				y[i]=x[i];
			} {
				x[i] = scan.nextInt();
				y[i]=x[i];
			} x[i] = scan.nextInt() x[i] x i scan.nextInt() scan.nextInt scan y[i]=x[i] y[i] y i x[i] x i Arrays.sort(x) Arrays.sort Arrays x while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			} true {
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			} if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			} x[0]==0 x[0] x 0 0 {
				gcd=x[1];
				break;
			} gcd=x[1] gcd x[1] x 1 break; {
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			} temp=x[0] temp x[0] x 0 x[0]=x[1]%x[0] x[0] x 0 x[1]%x[0] x[1] x 1 x[0] x 0 x[1]=temp x[1] x 1 temp y[0] /= gcd y[0] y 0 gcd y[1] /= gcd y[1] y 1 gcd lcm = y[0] * y[1] * gcd lcm y[0] * y[1] * gcd y[0] * y[1] * gcd y[0] y 0 y[1] y 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[] y = 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[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[] y = 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	}
} Main
import java.util.Arrays;
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[] y = 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();
				y[i]=x[i];
			}
			Arrays.sort(x);
			while(true){
			if(x[0]==0){
				gcd=x[1];
				break;
			}
			else{
				temp=x[0];
				x[0]=x[1]%x[0];
				x[1]=temp;
			}
			}

			y[0] /= gcd;
			y[1] /= gcd;
			lcm = y[0] * y[1] * gcd;
			System.out.println(gcd + " " + lcm);
		}
	}
}