import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		int gcd;
		
		while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		}
	}
	
	public static int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		int gcd;
		
		while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		}
	}
	
	public static int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		int gcd;
		
		while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int a, b;
		int gcd;
		
		while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a a b; b int gcd; gcd while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		} sc.hasNext() sc.hasNext sc {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		} a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc gcd = gcd(Math.max(a, b), Math.min(a, b)) gcd gcd(Math.max(a, b), Math.min(a, b)) gcd Math.max(a, b) Math.max Math a b Math.min(a, b) Math.min Math a b System.out.println(gcd + " " + a / gcd * b) System.out.println System.out System System.out gcd + " " + a / gcd * b gcd + " " + a / gcd * b gcd " " a / gcd * b a / gcd a gcd b String args[] args public static int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	} gcd {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	} if (b == 0) {
			return a;
		} b == 0 b 0 {
			return a;
		} return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b int a a int b b public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		int gcd;
		
		while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		}
	}
	
	public static int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		int gcd;
		
		while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		}
	}
	
	public static int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a, b;
		int gcd;
		
		while (sc.hasNext()) {
			a = sc.nextInt();
			b = sc.nextInt();
			gcd = gcd(Math.max(a, b), Math.min(a, b));
			System.out.println(gcd + " " + a / gcd * b);
		}
	}
	
	public static int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
}