import java.util.*;

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

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