import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		}
		
	}
	static int lcm(int a, int b) {
		for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		}
		return -1;
	}
	static int gcd(int a, int b) {
		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 s = new Scanner(System.in);
		while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		}
		
	}
	static int lcm(int a, int b) {
		for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		}
		return -1;
	}
	static int gcd(int a, int b) {
		if(b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		}
		
	} main {
		Scanner s = new Scanner(System.in);
		while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		}
		
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		} s.hasNext() s.hasNext s {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		} int a = s.nextInt(); a s.nextInt() s.nextInt s int b = s.nextInt(); b s.nextInt() s.nextInt s int g = lcm(a,b); g lcm(a,b) lcm a b int l = gcd(a,b); l gcd(a,b) gcd a b System.out.println(l + " " + g) System.out.println System.out System System.out l + " " + g l + " " + g l " " g String[] args args static int lcm(int a, int b) {
		for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		}
		return -1;
	} lcm {
		for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		}
		return -1;
	} for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		} int i = b; int i = b; i b i <= 2000000000 i 2000000000 i += b i += b i b {
			if(i % a == 0) {

				return i;
			}
		} {
			if(i % a == 0) {

				return i;
			}
		} if(i % a == 0) {

				return i;
			} i % a == 0 i % a i a 0 {

				return i;
			} return i; i return -1; -1 1 int a a int b b static int gcd(int a, int b) {
		if(b == 0) {
			return a;
		}
		return gcd(b, a % b);
	} gcd {
		if(b == 0) {
			return a;
		}
		return gcd(b, a % b);
	} if(b == 0) {
			return a;
		} b == 0 b 0 {
			return a;
		} 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 class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		}
		
	}
	static int lcm(int a, int b) {
		for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		}
		return -1;
	}
	static int gcd(int a, int b) {
		if(b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		}
		
	}
	static int lcm(int a, int b) {
		for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		}
		return -1;
	}
	static int gcd(int a, int b) {
		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 s = new Scanner(System.in);
		while(s.hasNext()) {
			int a = s.nextInt();
			int b = s.nextInt();
			
			int g = lcm(a,b);
			int l = gcd(a,b);
			System.out.println(l + " " + g);
		}
		
	}
	static int lcm(int a, int b) {
		for(int i = b; i <= 2000000000; i += b) {
			if(i % a == 0) {

				return i;
			}
		}
		return -1;
	}
	static int gcd(int a, int b) {
		if(b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
}