import java.util.*;

public class Main {

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

} import java.util.*; util.* java public class Main {

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

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

} public class Main {

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

} Main
import java.util.*;

public class Main {

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

}