import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		}

		close();

	}

	public static long input() {

		return scanner.nextLong();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

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

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		}

		close();

	}

	public static long input() {

		return scanner.nextLong();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main public static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) public static void main(String[] args) {

		while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		}

		close();

	} main {

		while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		}

		close();

	} while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		} scanner.hasNext() scanner.hasNext scanner {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		} long tempA = input(); tempA input() input long tempB = input(); tempB input() input long a; a long b; b long r; r long lcm; lcm if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			} tempB <= tempA tempB tempA {

				a = tempA;
				b = tempB;

			} a = tempA a tempA b = tempB b tempB {

				a = tempB;
				b = tempA;

			} a = tempB a tempB b = tempA b tempA while ((r = a % b) != 0) {

				a = b;
				b = r;

			} (r = a % b) != 0 (r = a % b) r a % b a b 0 {

				a = b;
				b = r;

			} a = b a b b = r b r lcm = tempA * tempB / b lcm tempA * tempB / b tempA * tempB tempA tempB b System.out.print(b) System.out.print System.out System System.out b System.out.print(" ") System.out.print System.out System System.out " " System.out.println(lcm) System.out.println System.out System System.out lcm close() close String[] args args public static long input() {

		return scanner.nextLong();

	} input {

		return scanner.nextLong();

	} return scanner.nextLong(); scanner.nextLong() scanner.nextLong scanner public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	} close {

		if (scanner != null) {

			scanner.close();

		}
	} if (scanner != null) {

			scanner.close();

		} scanner != null scanner null {

			scanner.close();

		} scanner.close() scanner.close scanner public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		}

		close();

	}

	public static long input() {

		return scanner.nextLong();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		}

		close();

	}

	public static long input() {

		return scanner.nextLong();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		while (scanner.hasNext()) {

			long tempA = input();
			long tempB = input();

			long a;
			long b;
			long r;
			long lcm;

			if (tempB <= tempA) {

				a = tempA;
				b = tempB;

			} else {

				a = tempB;
				b = tempA;

			}

			while ((r = a % b) != 0) {

				a = b;
				b = r;

			}

			lcm = tempA * tempB / b;

			System.out.print(b);
			System.out.print(" ");
			System.out.println(lcm);

		}

		close();

	}

	public static long input() {

		return scanner.nextLong();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
}