import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		}
	}
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		}
	} main {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		}
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		} s.hasNextInt() s.hasNextInt s {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		} int a = s.nextInt(); a s.nextInt() s.nextInt s int b = s.nextInt(); b s.nextInt() s.nextInt s int aa = a; aa a int bb = b; bb b while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			} true {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			} if (a < b) {
					int t = a;
					a = b;
					b = t;
				} a < b a b {
					int t = a;
					a = b;
					b = t;
				} int t = a; t a a = b a b b = t b t if(a%b == 0)break; a%b == 0 a%b a b 0 break; a = a%b a a%b a b bb/=b bb b System.out.println(b+" "+(aa*bb)) System.out.println System.out System System.out b+" "+(aa*bb) b+" "+(aa*bb) b " " (aa*bb) aa bb String[] args args public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int a = s.nextInt();
			int b = s.nextInt();
			int aa = a;
			int bb = b;
			while (true) {
				if (a < b) {
					int t = a;
					a = b;
					b = t;
				}
				if(a%b == 0)break;
				a = a%b;
			}
			bb/=b;
			System.out.println(b+" "+(aa*bb));
		}
	}
}