import java.util.Scanner;

public class Main {

	static int gcd(int a, int b){

		if(b==0)
			return a;
		else
			return gcd(b,a%b);
	}

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

		while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	static int gcd(int a, int b){

		if(b==0)
			return a;
		else
			return gcd(b,a%b);
	}

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

		while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		}
	}
} Main static int gcd(int a, int b){

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

		if(b==0)
			return a;
		else
			return gcd(b,a%b);
	} if(b==0)
			return a;
		else
			return gcd(b,a%b); b==0 b 0 return a; a return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b int a a int b b public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		}
	} main {
		Scanner stdIn = new Scanner(System.in);

		while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		} stdIn.hasNext() stdIn.hasNext stdIn {
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		} int a = stdIn.nextInt(); a stdIn.nextInt() stdIn.nextInt stdIn int b = stdIn.nextInt(); b stdIn.nextInt() stdIn.nextInt stdIn int gcd_ans = gcd(a,b); gcd_ans gcd(a,b) gcd a b int lcm_ans = a/gcd_ans*b; lcm_ans a/gcd_ans*b a/gcd_ans a gcd_ans b System.out.println(gcd_ans+" "+lcm_ans) System.out.println System.out System System.out gcd_ans+" "+lcm_ans gcd_ans+" "+lcm_ans gcd_ans " " lcm_ans String[] args args public class Main {

	static int gcd(int a, int b){

		if(b==0)
			return a;
		else
			return gcd(b,a%b);
	}

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

		while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		}
	}
} public class Main {

	static int gcd(int a, int b){

		if(b==0)
			return a;
		else
			return gcd(b,a%b);
	}

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

		while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	static int gcd(int a, int b){

		if(b==0)
			return a;
		else
			return gcd(b,a%b);
	}

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

		while(stdIn.hasNext()){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int gcd_ans = gcd(a,b);
			int lcm_ans = a/gcd_ans*b;

			System.out.println(gcd_ans+" "+lcm_ans);
		}
	}
}