import java.util.Scanner;

public class Main {
	/**
	 * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
	 * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		}

	}

	public static long greatestcommondivisor(long a, long b) {
		if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
	}

	public static long leastcommonmultiple(long a, long b) {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		long c = greatestcommondivisor(a, b);
		long d = a * b / c;
		return d;

	}

} import java.util.Scanner; Scanner java.util public class Main {
	/**
	 * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
	 * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		}

	}

	public static long greatestcommondivisor(long a, long b) {
		if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
	}

	public static long leastcommonmultiple(long a, long b) {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		long c = greatestcommondivisor(a, b);
		long d = a * b / c;
		return d;

	}

} Main /**
	 * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
	 * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		}

	} main {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		}

	} @SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		} sc.hasNext() sc.hasNext sc {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		} long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc System.out.print(greatestcommondivisor(a, b) + " " ) System.out.print System.out System System.out greatestcommondivisor(a, b) + " " greatestcommondivisor(a, b) greatestcommondivisor a b " " System.out.println(leastcommonmultiple(a, b)) System.out.println System.out System System.out leastcommonmultiple(a, b) leastcommonmultiple a b String[] args args public static long greatestcommondivisor(long a, long b) {
		if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
	} greatestcommondivisor {
		if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
	} if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        } a > b a b {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        } long tmp; tmp tmp = a tmp a a = b a b b = tmp b tmp while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        } a != 0 a 0 {
            long tmp = a;
            a = b%a;
            b = tmp;
        } long tmp = a; tmp a a = b%a a b%a b a b = tmp b tmp return b; b long a a long b b public static long leastcommonmultiple(long a, long b) {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		long c = greatestcommondivisor(a, b);
		long d = a * b / c;
		return d;

	} leastcommonmultiple {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		long c = greatestcommondivisor(a, b);
		long d = a * b / c;
		return d;

	} long c = greatestcommondivisor(a, b); c greatestcommondivisor(a, b) greatestcommondivisor a b long d = a * b / c; d a * b / c a * b a b c return d; d long a a long b b public class Main {
	/**
	 * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
	 * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		}

	}

	public static long greatestcommondivisor(long a, long b) {
		if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
	}

	public static long leastcommonmultiple(long a, long b) {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		long c = greatestcommondivisor(a, b);
		long d = a * b / c;
		return d;

	}

} public class Main {
	/**
	 * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
	 * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		}

	}

	public static long greatestcommondivisor(long a, long b) {
		if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
	}

	public static long leastcommonmultiple(long a, long b) {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		long c = greatestcommondivisor(a, b);
		long d = a * b / c;
		return d;

	}

} Main
import java.util.Scanner;

public class Main {
	/**
	 * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
	 * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			System.out.print(greatestcommondivisor(a, b) + " " );
			System.out.println(leastcommonmultiple(a, b));
		}

	}

	public static long greatestcommondivisor(long a, long b) {
		if(a > b) {
            long tmp;
            tmp = a;
            a = b;
            b = tmp;
        }

        while(a != 0) {
            long tmp = a;
            a = b%a;
            b = tmp;
        }

        return b;
	}

	public static long leastcommonmultiple(long a, long b) {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		long c = greatestcommondivisor(a, b);
		long d = a * b / c;
		return d;

	}

}