import java.util.*;

public class Main {

	/**
	 * @param args
	 */
	Scanner sc = new Scanner(System.in);
	StringTokenizer st;
	
	long gcd(long a, long b) {
		if (b == 0) return a;
		return gcd(b, a % b);
	}
	
	
	void run() {
		long a, b;
		while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		}
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

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

	/**
	 * @param args
	 */
	Scanner sc = new Scanner(System.in);
	StringTokenizer st;
	
	long gcd(long a, long b) {
		if (b == 0) return a;
		return gcd(b, a % b);
	}
	
	
	void run() {
		long a, b;
		while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		}
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

} Main /**
	 * @param args
	 */
	Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringTokenizer st; st long gcd(long a, long 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; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b long a a long b b void run() {
		long a, b;
		while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		}
	} run {
		long a, b;
		while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		}
	} long a a b; b while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		} sc.hasNextLine() sc.hasNextLine sc {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		} st = new StringTokenizer(sc.nextLine()) st new StringTokenizer(sc.nextLine()) a = Integer.parseInt(st.nextToken()) a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st b = Integer.parseInt(st.nextToken()) b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b)) System.out.printf System.out System System.out "%d %d\n" gcd(a,b) gcd a b a*b/gcd(a,b) a*b a b gcd(a,b) gcd a b public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	} main {
		// TODO Auto-generated method stub
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {

	/**
	 * @param args
	 */
	Scanner sc = new Scanner(System.in);
	StringTokenizer st;
	
	long gcd(long a, long b) {
		if (b == 0) return a;
		return gcd(b, a % b);
	}
	
	
	void run() {
		long a, b;
		while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		}
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

} public class Main {

	/**
	 * @param args
	 */
	Scanner sc = new Scanner(System.in);
	StringTokenizer st;
	
	long gcd(long a, long b) {
		if (b == 0) return a;
		return gcd(b, a % b);
	}
	
	
	void run() {
		long a, b;
		while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		}
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

} Main
import java.util.*;

public class Main {

	/**
	 * @param args
	 */
	Scanner sc = new Scanner(System.in);
	StringTokenizer st;
	
	long gcd(long a, long b) {
		if (b == 0) return a;
		return gcd(b, a % b);
	}
	
	
	void run() {
		long a, b;
		while (sc.hasNextLine()) {
			st = new StringTokenizer(sc.nextLine());
			a = Integer.parseInt(st.nextToken());
			b = Integer.parseInt(st.nextToken());
			System.out.printf("%d %d\n", gcd(a,b), a*b/gcd(a,b));
		}
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

}