import java.util.*;
import java.lang.Math;
import java.math.BigInteger;

class Main {
    public static void main (String [] args) {

        Scanner sc = new Scanner(System.in);

        BigInteger a, b;

        while (true) {
            try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            }

            BigInteger g = a.gcd(b);
           System.out.printf("%d %d\n", g, a.divide(g).multiply(b)); 
        }
    }
} import java.util.*; util.* java import java.lang.Math; Math java.lang import java.math.BigInteger; BigInteger java.math class Main {
    public static void main (String [] args) {

        Scanner sc = new Scanner(System.in);

        BigInteger a, b;

        while (true) {
            try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            }

            BigInteger g = a.gcd(b);
           System.out.printf("%d %d\n", g, a.divide(g).multiply(b)); 
        }
    }
} Main public static void main (String [] args) {

        Scanner sc = new Scanner(System.in);

        BigInteger a, b;

        while (true) {
            try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            }

            BigInteger g = a.gcd(b);
           System.out.printf("%d %d\n", g, a.divide(g).multiply(b)); 
        }
    } main {

        Scanner sc = new Scanner(System.in);

        BigInteger a, b;

        while (true) {
            try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            }

            BigInteger g = a.gcd(b);
           System.out.printf("%d %d\n", g, a.divide(g).multiply(b)); 
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigInteger a a b; b while (true) {
            try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            }

            BigInteger g = a.gcd(b);
           System.out.printf("%d %d\n", g, a.divide(g).multiply(b)); 
        } true {
            try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            }

            BigInteger g = a.gcd(b);
           System.out.printf("%d %d\n", g, a.divide(g).multiply(b)); 
        } try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            } catch (NoSuchElementException e) {
               break;
            } NoSuchElementException e {
               break;
            } break; {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } a = new BigInteger(sc.next()) a new BigInteger(sc.next()) b = new BigInteger(sc.next()) b new BigInteger(sc.next()) BigInteger g = a.gcd(b); g a.gcd(b) a.gcd a b System.out.printf("%d %d\n", g, a.divide(g).multiply(b)) System.out.printf System.out System System.out "%d %d\n" g a.divide(g).multiply(b) a.divide(g).multiply a.divide(g) a.divide a g b String [] args args
import java.util.*;
import java.lang.Math;
import java.math.BigInteger;

class Main {
    public static void main (String [] args) {

        Scanner sc = new Scanner(System.in);

        BigInteger a, b;

        while (true) {
            try {
               a = new BigInteger(sc.next());
               b = new BigInteger(sc.next());
            } catch (NoSuchElementException e) {
               break;
            }

            BigInteger g = a.gcd(b);
           System.out.printf("%d %d\n", g, a.divide(g).multiply(b)); 
        }
    }
}