import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] a){

		String str;
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

		try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		}
	}

	private static long euclidean(long num1, long num2){
		if(num2 == 0){
			return num1;
		}
		long tmp_num = num1 % num2;
		return euclidean(num2, tmp_num);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] a){

		String str;
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

		try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		}
	}

	private static long euclidean(long num1, long num2){
		if(num2 == 0){
			return num1;
		}
		long tmp_num = num1 % num2;
		return euclidean(num2, tmp_num);
	}
} Main public static void main(String[] a){

		String str;
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

		try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		}
	} main {

		String str;
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

		try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		}
	} String str; str BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); bf new BufferedReader(new InputStreamReader(System.in)) try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			try {
				bf.close();
			} catch (IOException e) {
			}
		} try {
				bf.close();
			} catch (IOException e) {
			} catch (IOException e) {
			} IOException e {
			} {
				bf.close();
			} bf.close() bf.close bf {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			} null != ( str = bf.readLine() ) null ( str = bf.readLine() ) str bf.readLine() bf.readLine bf {
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			} String[] arr = str.split(" "); arr str.split(" ") str.split str " " long num1 = Long.parseLong(arr[0]); num1 Long.parseLong(arr[0]) Long.parseLong Long arr[0] arr 0 long num2 = Long.parseLong(arr[1]); num2 Long.parseLong(arr[1]) Long.parseLong Long arr[1] arr 1 long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1); min_num num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1) num1>num2 num1 num2 euclidean( num1, num2) euclidean num1 num2 euclidean(num2, num1) euclidean num2 num1 long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num; max_num ( num1 / min_num ) * ( num2 / min_num ) * min_num ( num1 / min_num ) * ( num2 / min_num ) * min_num ( num1 / min_num ) num1 min_num ( num2 / min_num ) num2 min_num min_num System.out.println(min_num + " " + max_num) System.out.println System.out System System.out min_num + " " + max_num min_num + " " + max_num min_num " " max_num String[] a a private static long euclidean(long num1, long num2){
		if(num2 == 0){
			return num1;
		}
		long tmp_num = num1 % num2;
		return euclidean(num2, tmp_num);
	} euclidean {
		if(num2 == 0){
			return num1;
		}
		long tmp_num = num1 % num2;
		return euclidean(num2, tmp_num);
	} if(num2 == 0){
			return num1;
		} num2 == 0 num2 0 {
			return num1;
		} return num1; num1 long tmp_num = num1 % num2; tmp_num num1 % num2 num1 num2 return euclidean(num2, tmp_num); euclidean(num2, tmp_num) euclidean num2 tmp_num long num1 num1 long num2 num2 public class Main {

	public static void main(String[] a){

		String str;
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

		try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		}
	}

	private static long euclidean(long num1, long num2){
		if(num2 == 0){
			return num1;
		}
		long tmp_num = num1 % num2;
		return euclidean(num2, tmp_num);
	}
} public class Main {

	public static void main(String[] a){

		String str;
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

		try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		}
	}

	private static long euclidean(long num1, long num2){
		if(num2 == 0){
			return num1;
		}
		long tmp_num = num1 % num2;
		return euclidean(num2, tmp_num);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] a){

		String str;
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

		try {
			while(null != ( str = bf.readLine() )){
				String[] arr = str.split(" ");
				long num1 = Long.parseLong(arr[0]);
				long num2 = Long.parseLong(arr[1]);
				long min_num = num1>num2 ? euclidean( num1, num2) : euclidean(num2, num1);
				long max_num = ( num1 / min_num ) * ( num2 / min_num ) * min_num;
				System.out.println(min_num + " " + max_num);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				bf.close();
			} catch (IOException e) {
			}
		}
	}

	private static long euclidean(long num1, long num2){
		if(num2 == 0){
			return num1;
		}
		long tmp_num = num1 % num2;
		return euclidean(num2, tmp_num);
	}
}