import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scn = new Scanner(System.in);
		while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		}
	}

	public static int getCommonDivider(int a, int b)
	{
		if (b == 0) return a;
		int q = a % b;
		return getCommonDivider(b, q);
	}

	public static int getCommonMultiplier(int a, int b)
	{
		int v = getCommonDivider(a, b);
		int va = a / v;
		int vb = b / v;
		return v*(va*vb);
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner scn = new Scanner(System.in);
		while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		}
	}

	public static int getCommonDivider(int a, int b)
	{
		if (b == 0) return a;
		int q = a % b;
		return getCommonDivider(b, q);
	}

	public static int getCommonMultiplier(int a, int b)
	{
		int v = getCommonDivider(a, b);
		int va = a / v;
		int vb = b / v;
		return v*(va*vb);
	}
} Main public static void main(String[] args)
	{
		Scanner scn = new Scanner(System.in);
		while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		}
	} main {
		Scanner scn = new Scanner(System.in);
		while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		}
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		} scn.hasNext() scn.hasNext scn {
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		} int a = scn.nextInt(); a scn.nextInt() scn.nextInt scn int b = scn.nextInt(); b scn.nextInt() scn.nextInt scn System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b)) System.out.printf System.out System System.out "%d %d\n" getCommonDivider(a, b) getCommonDivider a b getCommonMultiplier(a, b) getCommonMultiplier a b String[] args args public static int getCommonDivider(int a, int b)
	{
		if (b == 0) return a;
		int q = a % b;
		return getCommonDivider(b, q);
	} getCommonDivider {
		if (b == 0) return a;
		int q = a % b;
		return getCommonDivider(b, q);
	} if (b == 0) return a; b == 0 b 0 return a; a int q = a % b; q a % b a b return getCommonDivider(b, q); getCommonDivider(b, q) getCommonDivider b q int a a int b b public static int getCommonMultiplier(int a, int b)
	{
		int v = getCommonDivider(a, b);
		int va = a / v;
		int vb = b / v;
		return v*(va*vb);
	} getCommonMultiplier {
		int v = getCommonDivider(a, b);
		int va = a / v;
		int vb = b / v;
		return v*(va*vb);
	} int v = getCommonDivider(a, b); v getCommonDivider(a, b) getCommonDivider a b int va = a / v; va a / v a v int vb = b / v; vb b / v b v return v*(va*vb); v*(va*vb) v (va*vb) va vb int a a int b b public class Main
{
	public static void main(String[] args)
	{
		Scanner scn = new Scanner(System.in);
		while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		}
	}

	public static int getCommonDivider(int a, int b)
	{
		if (b == 0) return a;
		int q = a % b;
		return getCommonDivider(b, q);
	}

	public static int getCommonMultiplier(int a, int b)
	{
		int v = getCommonDivider(a, b);
		int va = a / v;
		int vb = b / v;
		return v*(va*vb);
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner scn = new Scanner(System.in);
		while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		}
	}

	public static int getCommonDivider(int a, int b)
	{
		if (b == 0) return a;
		int q = a % b;
		return getCommonDivider(b, q);
	}

	public static int getCommonMultiplier(int a, int b)
	{
		int v = getCommonDivider(a, b);
		int va = a / v;
		int vb = b / v;
		return v*(va*vb);
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scn = new Scanner(System.in);
		while(scn.hasNext())
		{
			int a = scn.nextInt();
			int b = scn.nextInt();
			System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
		}
	}

	public static int getCommonDivider(int a, int b)
	{
		if (b == 0) return a;
		int q = a % b;
		return getCommonDivider(b, q);
	}

	public static int getCommonMultiplier(int a, int b)
	{
		int v = getCommonDivider(a, b);
		int va = a / v;
		int vb = b / v;
		return v*(va*vb);
	}
}