import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		long a,b,z,A,B;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		long a,b,z,A,B;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		}
	}
} Main public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		long a,b,z,A,B;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		long a,b,z,A,B;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a a b b z z A A B; B while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		} scan.hasNext() scan.hasNext scan {
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		} a = scan.nextInt() a scan.nextInt() scan.nextInt scan b = scan.nextInt() b scan.nextInt() scan.nextInt scan z = 1 z 1 A = a A a B = b B b while(z != 0){
				z = a % b;
				a = b;
				b = z;
			} z != 0 z 0 {
				z = a % b;
				a = b;
				b = z;
			} z = a % b z a % b a b a = b a b b = z b z for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			} int i = 1 ; int i = 1 ; i 1 i > 0 i 0 i++ i++ i {
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			} {
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			} if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				} A*B == a*i A*B A B a*i a i {
					System.out.println(a + " " + i);
					break;
				} System.out.println(a + " " + i) System.out.println System.out System System.out a + " " + i a + " " + i a " " i break; String[] args args public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		long a,b,z,A,B;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		long a,b,z,A,B;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		}
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		long a,b,z,A,B;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			z = 1;
			A = a;
			B = b;
			while(z != 0){
				z = a % b;
				a = b;
				b = z;
			}
			for(int i = 1 ; i > 0 ; i++){
				if(A*B == a*i){
					System.out.println(a + " " + i);
					break;
				}
			}
		}
	}
}