import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		}
	}
	//最大公約数gcdを求める
	static int gcd (int a, int b) {
		int temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return b;
	}

	//最小公倍数lcmを求める
	static long lcm (int a, int b) {
		int temp;
		long c = a;
		long d = b;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return (c*d)/b;
	}
} import java.util.*; util.* java public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		}
	}
	//最大公約数gcdを求める
	static int gcd (int a, int b) {
		int temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return b;
	}

	//最小公倍数lcmを求める
	static long lcm (int a, int b) {
		int temp;
		long c = a;
		long d = b;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return (c*d)/b;
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		}
	} main {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		}
	} while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc System.out.println(gcd(a,b)+" "+lcm(a,b)) System.out.println System.out System System.out gcd(a,b)+" "+lcm(a,b) gcd(a,b)+" "+lcm(a,b) gcd(a,b) gcd a b " " lcm(a,b) lcm a b String[] args args //最大公約数gcdを求める
	static int gcd (int a, int b) {
		int temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return b;
	} gcd {
		int temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return b;
	} int temp; temp while((temp = a%b)!=0) {
			a = b;
			b = temp;
		} (temp = a%b)!=0 (temp = a%b) temp a%b a b 0 {
			a = b;
			b = temp;
		} a = b a b b = temp b temp return b; b int a a int b b //最小公倍数lcmを求める
	static long lcm (int a, int b) {
		int temp;
		long c = a;
		long d = b;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return (c*d)/b;
	} lcm {
		int temp;
		long c = a;
		long d = b;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return (c*d)/b;
	} int temp; temp long c = a; c a long d = b; d b while((temp = a%b)!=0) {
			a = b;
			b = temp;
		} (temp = a%b)!=0 (temp = a%b) temp a%b a b 0 {
			a = b;
			b = temp;
		} a = b a b b = temp b temp return (c*d)/b; (c*d)/b (c*d) c d b int a a int b b public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		}
	}
	//最大公約数gcdを求める
	static int gcd (int a, int b) {
		int temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return b;
	}

	//最小公倍数lcmを求める
	static long lcm (int a, int b) {
		int temp;
		long c = a;
		long d = b;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return (c*d)/b;
	}
} public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		}
	}
	//最大公約数gcdを求める
	static int gcd (int a, int b) {
		int temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return b;
	}

	//最小公倍数lcmを求める
	static long lcm (int a, int b) {
		int temp;
		long c = a;
		long d = b;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return (c*d)/b;
	}
} Main
import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(gcd(a,b)+" "+lcm(a,b));
		}
	}
	//最大公約数gcdを求める
	static int gcd (int a, int b) {
		int temp;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return b;
	}

	//最小公倍数lcmを求める
	static long lcm (int a, int b) {
		int temp;
		long c = a;
		long d = b;
		while((temp = a%b)!=0) {
			a = b;
			b = temp;
		}
		return (c*d)/b;
	}
}
