import java.math.BigInteger;
import java.util.Scanner;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            BigInteger a = sc.nextBigInteger();
            BigInteger b = sc.nextBigInteger();

            BigInteger gcd = a.gcd(b);
            BigInteger lcm = a.multiply(b).divide(gcd);
            System.out.println(gcd + " " + lcm);
        }
    }
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            BigInteger a = sc.nextBigInteger();
            BigInteger b = sc.nextBigInteger();

            BigInteger gcd = a.gcd(b);
            BigInteger lcm = a.multiply(b).divide(gcd);
            System.out.println(gcd + " " + lcm);
        }
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            BigInteger a = sc.nextBigInteger();
            BigInteger b = sc.nextBigInteger();

            BigInteger gcd = a.gcd(b);
            BigInteger lcm = a.multiply(b).divide(gcd);
            System.out.println(gcd + " " + lcm);
        }
    } main {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            BigInteger a = sc.nextBigInteger();
            BigInteger b = sc.nextBigInteger();

            BigInteger gcd = a.gcd(b);
            BigInteger lcm = a.multiply(b).divide(gcd);
            System.out.println(gcd + " " + lcm);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            BigInteger a = sc.nextBigInteger();
            BigInteger b = sc.nextBigInteger();

            BigInteger gcd = a.gcd(b);
            BigInteger lcm = a.multiply(b).divide(gcd);
            System.out.println(gcd + " " + lcm);
        } sc.hasNext() sc.hasNext sc {
            BigInteger a = sc.nextBigInteger();
            BigInteger b = sc.nextBigInteger();

            BigInteger gcd = a.gcd(b);
            BigInteger lcm = a.multiply(b).divide(gcd);
            System.out.println(gcd + " " + lcm);
        } BigInteger a = sc.nextBigInteger(); a sc.nextBigInteger() sc.nextBigInteger sc BigInteger b = sc.nextBigInteger(); b sc.nextBigInteger() sc.nextBigInteger sc BigInteger gcd = a.gcd(b); gcd a.gcd(b) a.gcd a b BigInteger lcm = a.multiply(b).divide(gcd); lcm a.multiply(b).divide(gcd) a.multiply(b).divide a.multiply(b) a.multiply a b gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String args[] args
import java.math.BigInteger;
import java.util.Scanner;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            BigInteger a = sc.nextBigInteger();
            BigInteger b = sc.nextBigInteger();

            BigInteger gcd = a.gcd(b);
            BigInteger lcm = a.multiply(b).divide(gcd);
            System.out.println(gcd + " " + lcm);
        }
    }
}