

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 * @author Lin
 * @version 1.0
 * @date 2020/8/5 15:43
 */
public class Main
{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		}
	}

	private static long gcd(long n, long m)
	{
		if (n%m == 0)
		{
			return m;
		}
		return gcd(m, n % m);
	}

	static class Reader {
		static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		static StringTokenizer tokenizer = new StringTokenizer("");
		static String nextLine() throws IOException
		{// 读取下一行字符串
			return reader.readLine();
		}
		static String next() throws IOException {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		}

		static int nextInt() throws IOException {// 读取下一个int型数值
			return Integer.parseInt(next());
		}
		static long nextLong() throws IOException {// 读取下一个int型数值
			return Long.parseLong(next());
		}
		static double nextDouble() throws IOException {// 读取下一个double型数值
			return Double.parseDouble(next());
		}
	}
}
 import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.Reader; Reader java.io import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main
{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		}
	}

	private static long gcd(long n, long m)
	{
		if (n%m == 0)
		{
			return m;
		}
		return gcd(m, n % m);
	}

	static class Reader {
		static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		static StringTokenizer tokenizer = new StringTokenizer("");
		static String nextLine() throws IOException
		{// 读取下一行字符串
			return reader.readLine();
		}
		static String next() throws IOException {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		}

		static int nextInt() throws IOException {// 读取下一个int型数值
			return Integer.parseInt(next());
		}
		static long nextLong() throws IOException {// 读取下一个int型数值
			return Long.parseLong(next());
		}
		static double nextDouble() throws IOException {// 读取下一个double型数值
			return Double.parseDouble(next());
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		} scanner.hasNext() scanner.hasNext scanner {
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		} long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner long m = scanner.nextLong(); m scanner.nextLong() scanner.nextLong scanner long gcd = gcd(Math.max(n, m), Math.min(m, n)); gcd gcd(Math.max(n, m), Math.min(m, n)) gcd Math.max(n, m) Math.max Math n m Math.min(m, n) Math.min Math m n long lcm = n * (m / gcd); lcm n * (m / gcd) n (m / gcd) m gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] args args private static long gcd(long n, long m)
	{
		if (n%m == 0)
		{
			return m;
		}
		return gcd(m, n % m);
	} gcd {
		if (n%m == 0)
		{
			return m;
		}
		return gcd(m, n % m);
	} if (n%m == 0)
		{
			return m;
		} n%m == 0 n%m n m 0 {
			return m;
		} return m; m return gcd(m, n % m); gcd(m, n % m) gcd m n % m n m long n n long m m static class Reader {
		static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		static StringTokenizer tokenizer = new StringTokenizer("");
		static String nextLine() throws IOException
		{// 读取下一行字符串
			return reader.readLine();
		}
		static String next() throws IOException {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		}

		static int nextInt() throws IOException {// 读取下一个int型数值
			return Integer.parseInt(next());
		}
		static long nextLong() throws IOException {// 读取下一个int型数值
			return Long.parseLong(next());
		}
		static double nextDouble() throws IOException {// 读取下一个double型数值
			return Double.parseDouble(next());
		}
	} Reader static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) static StringTokenizer tokenizer = new StringTokenizer(""); tokenizer new StringTokenizer("") static String nextLine() throws IOException
		{// 读取下一行字符串
			return reader.readLine();
		} nextLine {// 读取下一行字符串
			return reader.readLine();
		} return reader.readLine(); reader.readLine() reader.readLine reader static String next() throws IOException {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		} next {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		} while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			} !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
				tokenizer = new StringTokenizer(reader.readLine());
			} tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer static int nextInt() throws IOException {// 读取下一个int型数值
			return Integer.parseInt(next());
		} nextInt {// 读取下一个int型数值
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next static long nextLong() throws IOException {// 读取下一个int型数值
			return Long.parseLong(next());
		} nextLong {// 读取下一个int型数值
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next static double nextDouble() throws IOException {// 读取下一个double型数值
			return Double.parseDouble(next());
		} nextDouble {// 读取下一个double型数值
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public class Main
{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		}
	}

	private static long gcd(long n, long m)
	{
		if (n%m == 0)
		{
			return m;
		}
		return gcd(m, n % m);
	}

	static class Reader {
		static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		static StringTokenizer tokenizer = new StringTokenizer("");
		static String nextLine() throws IOException
		{// 读取下一行字符串
			return reader.readLine();
		}
		static String next() throws IOException {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		}

		static int nextInt() throws IOException {// 读取下一个int型数值
			return Integer.parseInt(next());
		}
		static long nextLong() throws IOException {// 读取下一个int型数值
			return Long.parseLong(next());
		}
		static double nextDouble() throws IOException {// 读取下一个double型数值
			return Double.parseDouble(next());
		}
	}
} public class Main
{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		}
	}

	private static long gcd(long n, long m)
	{
		if (n%m == 0)
		{
			return m;
		}
		return gcd(m, n % m);
	}

	static class Reader {
		static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		static StringTokenizer tokenizer = new StringTokenizer("");
		static String nextLine() throws IOException
		{// 读取下一行字符串
			return reader.readLine();
		}
		static String next() throws IOException {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		}

		static int nextInt() throws IOException {// 读取下一个int型数值
			return Integer.parseInt(next());
		}
		static long nextLong() throws IOException {// 读取下一个int型数值
			return Long.parseLong(next());
		}
		static double nextDouble() throws IOException {// 读取下一个double型数值
			return Double.parseDouble(next());
		}
	}
} Main


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 * @author Lin
 * @version 1.0
 * @date 2020/8/5 15:43
 */
public class Main
{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext())
		{
			long n = scanner.nextLong();
			long m = scanner.nextLong();

			long gcd = gcd(Math.max(n, m), Math.min(m, n));
			long lcm = n * (m / gcd);
			System.out.println(gcd + " " + lcm);
		}
	}

	private static long gcd(long n, long m)
	{
		if (n%m == 0)
		{
			return m;
		}
		return gcd(m, n % m);
	}

	static class Reader {
		static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		static StringTokenizer tokenizer = new StringTokenizer("");
		static String nextLine() throws IOException
		{// 读取下一行字符串
			return reader.readLine();
		}
		static String next() throws IOException {// 读取下一个字符串
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
			return tokenizer.nextToken();
		}

		static int nextInt() throws IOException {// 读取下一个int型数值
			return Integer.parseInt(next());
		}
		static long nextLong() throws IOException {// 读取下一个int型数值
			return Long.parseLong(next());
		}
		static double nextDouble() throws IOException {// 读取下一个double型数值
			return Double.parseDouble(next());
		}
	}
}

