import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext())
		{
			a = sc.nextLong();
			b = sc.nextLong();
			g = gcd(a,b);
			l = (a*b)/g;
			System.out.println(g + " " + l);
		}
	}

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

	private static long gcd(long a, long b) {
		if(a==0) return b;
		else if(b==0) return a;
		return gcd(b,a%b);
	}
} Main public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext())
		{
			a = sc.nextLong();
			b = sc.nextLong();
			g = gcd(a,b);
			l = (a*b)/g;
			System.out.println(g + " " + l);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext())
		{
			a = sc.nextLong();
			b = sc.nextLong();
			g = gcd(a,b);
			l = (a*b)/g;
			System.out.println(g + " " + l);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a a b b g g l; l while(sc.hasNext())
		{
			a = sc.nextLong();
			b = sc.nextLong();
			g = gcd(a,b);
			l = (a*b)/g;
			System.out.println(g + " " + l);
		} sc.hasNext() sc.hasNext sc {
			a = sc.nextLong();
			b = sc.nextLong();
			g = gcd(a,b);
			l = (a*b)/g;
			System.out.println(g + " " + l);
		} a = sc.nextLong() a sc.nextLong() sc.nextLong sc b = sc.nextLong() b sc.nextLong() sc.nextLong sc g = gcd(a,b) g gcd(a,b) gcd a b l = (a*b)/g l (a*b)/g (a*b) a b g System.out.println(g + " " + l) System.out.println System.out System System.out g + " " + l g + " " + l g " " l String args[] args private static long gcd(long a, long b) {
		if(a==0) return b;
		else if(b==0) return a;
		return gcd(b,a%b);
	} gcd {
		if(a==0) return b;
		else if(b==0) return a;
		return gcd(b,a%b);
	} if(a==0) return b;
		else if(b==0) return a; a==0 a 0 return b; b if(b==0) return a; b==0 b 0 return a; a 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,g,l;
		while(sc.hasNext())
		{
			a = sc.nextLong();
			b = sc.nextLong();
			g = gcd(a,b);
			l = (a*b)/g;
			System.out.println(g + " " + l);
		}
	}

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

	private static long gcd(long a, long b) {
		if(a==0) return b;
		else if(b==0) return a;
		return gcd(b,a%b);
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		long a,b,g,l;
		while(sc.hasNext())
		{
			a = sc.nextLong();
			b = sc.nextLong();
			g = gcd(a,b);
			l = (a*b)/g;
			System.out.println(g + " " + l);
		}
	}

	private static long gcd(long a, long b) {
		if(a==0) return b;
		else if(b==0) return a;
		return gcd(b,a%b);
	}
}