import java.util.Scanner;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		long a, b, m, n,tmp;

		while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

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

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		long a, b, m, n,tmp;

		while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		}
	}
} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		long a, b, m, n,tmp;

		while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		long a, b, m, n,tmp;

		while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) long a a b b m m n n tmp; tmp while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		} scanner.hasNext() scanner.hasNext scanner {
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		} a = m = scanner.nextInt() a m = scanner.nextInt() m scanner.nextInt() scanner.nextInt scanner b = n = scanner.nextInt() b n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			} m < n m n {
				tmp = m;
				m = n;
				n = tmp;
			} tmp = m tmp m m = n m n n = tmp n tmp for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			} ; {
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			} {
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			} if(n == 0) break; n == 0 n 0 break; tmp = n tmp n n = m % n n m % n m n m = tmp m tmp System.out.println(m +" " + a * b / m) System.out.println System.out System System.out m +" " + a * b / m m +" " + a * b / m m " " a * b / m a * b a b m String[] args args public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		long a, b, m, n,tmp;

		while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		}
	}
} public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		long a, b, m, n,tmp;

		while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		}
	}
} Main
import java.util.Scanner;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		long a, b, m, n,tmp;

		while(scanner.hasNext()){
			a = m = scanner.nextInt();
			b = n = scanner.nextInt();
			if(m < n){
				tmp = m;
				m = n;
				n = tmp;
			}

			for(;;){
				if(n == 0) break;

				tmp = n;
				n = m % n;
				m = tmp;
			}

			System.out.println(m +" " + a * b / m);

		}
	}
}