import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a, b, c, GCD, LCM, a_base, b_base;
		while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		}
	}
	static long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		return gcd(b, a % b);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a, b, c, GCD, LCM, a_base, b_base;
		while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		}
	}
	static long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		return gcd(b, a % b);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a, b, c, GCD, LCM, a_base, b_base;
		while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		long a, b, c, GCD, LCM, a_base, b_base;
		while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a a b b c c GCD GCD LCM LCM a_base a_base b_base; b_base while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		} sc.hasNext() sc.hasNext sc {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		} a = sc.nextLong() a sc.nextLong() sc.nextLong sc b = sc.nextLong() b sc.nextLong() sc.nextLong sc a_base = a a_base a b_base = b b_base b if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			} a < b a b {
				long sub;
				sub = a;
				a = b;
				b = sub;
			} long sub; sub sub = a sub a a = b a b b = sub b sub GCD = gcd(a, b) GCD gcd(a, b) gcd a b LCM = (a_base * b_base) / GCD LCM (a_base * b_base) / GCD (a_base * b_base) a_base b_base GCD System.out.println(GCD + " " + LCM) System.out.println System.out System System.out GCD + " " + LCM GCD + " " + LCM GCD " " LCM String[] args args static long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		return gcd(b, a % b);
	} gcd {
		if (a % b == 0)
			return b;
		return gcd(b, a % b);
	} if (a % b == 0)
			return b; a % b == 0 a % b a b 0 return b; b return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b long a a long b b public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a, b, c, GCD, LCM, a_base, b_base;
		while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		}
	}
	static long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		return gcd(b, a % b);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a, b, c, GCD, LCM, a_base, b_base;
		while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		}
	}
	static long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		return gcd(b, a % b);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a, b, c, GCD, LCM, a_base, b_base;
		while (sc.hasNext()) {
			a = sc.nextLong();
			b = sc.nextLong();
			a_base = a;
			b_base = b;
			if (a < b) {
				long sub;
				sub = a;
				a = b;
				b = sub;
			}
			GCD = gcd(a, b);
			LCM = (a_base * b_base) / GCD;
			System.out.println(GCD + " " + LCM);
		}
	}
	static long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		return gcd(b, a % b);
	}
}