import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a1, b1, r1, r2, temp, a2, b2;

		while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		}
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a1, b1, r1, r2, temp, a2, b2;

		while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		}
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a1, b1, r1, r2, temp, a2, b2;

		while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		long a1, b1, r1, r2, temp, a2, b2;

		while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a1 a1 b1 b1 r1 r1 r2 r2 temp temp a2 a2 b2; b2 while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		} scan.hasNext() scan.hasNext scan {
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		} a1 = scan.nextInt() a1 scan.nextInt() scan.nextInt scan a2 = a1 a2 a1 b1 = scan.nextInt() b1 scan.nextInt() scan.nextInt scan b2 = b1 b2 b1 while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			} a2 % b2 != 0 a2 % b2 a2 b2 0 {
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			} if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				} a2 < b2 a2 b2 {
					temp = a2;
					a2 = b2;
					b2 = temp;
				} temp = a2 temp a2 a2 = b2 a2 b2 b2 = temp b2 temp a2 = a2 % b2 a2 a2 % b2 a2 b2 r1 = b2 r1 b2 r2 = (a1*b1) / r1 r2 (a1*b1) / r1 (a1*b1) a1 b1 r1 System.out.println(r1+" "+r2) System.out.println System.out System System.out r1+" "+r2 r1+" "+r2 r1 " " r2 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a1, b1, r1, r2, temp, a2, b2;

		while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a1, b1, r1, r2, temp, a2, b2;

		while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		}
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long a1, b1, r1, r2, temp, a2, b2;

		while(scan.hasNext()){
			a1 = scan.nextInt();
			a2 = a1;
			b1 = scan.nextInt();
			b2 = b1;
			while(a2 % b2 != 0){
				if(a2 < b2){
					temp = a2;
					a2 = b2;
					b2 = temp;
				}
				a2 = a2 % b2;
			}
			r1 = b2;
			r2 = (a1*b1) / r1;
			System.out.println(r1+" "+r2);
		}
	}

}