import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		double firstinput;
		double secondinput;
		double product;
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		double firstinput;
		double secondinput;
		double product;
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		}
	}
} Main public static void main(String[] args) {
		double firstinput;
		double secondinput;
		double product;
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		}
	} main {
		double firstinput;
		double secondinput;
		double product;
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		}
	} double firstinput; firstinput double secondinput; secondinput double product; product Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		} scanner.hasNext() scanner.hasNext scanner {
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		} firstinput = scanner.nextDouble() firstinput scanner.nextDouble() scanner.nextDouble scanner secondinput = scanner.nextDouble() secondinput scanner.nextDouble() scanner.nextDouble scanner product = firstinput * secondinput product firstinput * secondinput firstinput secondinput while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			} true {
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			} double tmpdouble = firstinput % secondinput; tmpdouble firstinput % secondinput firstinput secondinput if(tmpdouble == 0){
					break;
				} tmpdouble == 0 tmpdouble 0 {
					break;
				} break; firstinput = secondinput firstinput secondinput secondinput = tmpdouble secondinput tmpdouble System.out.println((int)secondinput + " " + (int)(product / secondinput)) System.out.println System.out System System.out (int)secondinput + " " + (int)(product / secondinput) (int)secondinput + " " + (int)(product / secondinput) (int)secondinput " " (int)(product / secondinput) product secondinput String[] args args public class Main {
	public static void main(String[] args) {
		double firstinput;
		double secondinput;
		double product;
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		}
	}
} public class Main {
	public static void main(String[] args) {
		double firstinput;
		double secondinput;
		double product;
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		double firstinput;
		double secondinput;
		double product;
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			firstinput = scanner.nextDouble();
			secondinput = scanner.nextDouble();
			product = firstinput * secondinput;
			while(true){
				double tmpdouble = firstinput % secondinput;
				if(tmpdouble == 0){
					break;
				}
				firstinput = secondinput;
				secondinput = tmpdouble;
			}
			System.out.println((int)secondinput + " " + (int)(product / secondinput));
		}
	}
}