import java.util.*;

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

        while (input.hasNext()) {
            int a = input.nextInt();
            int b = input.nextInt();
            int gcd = GCD(a, b);
            int lcm = a / gcd * b;

            System.out.println(gcd + " " + lcm);
        }
    }
    
    public static int GCD (int a, int b) {
        if (b == 0) {
            return a;
        }
        return GCD(b, a % b);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        while (input.hasNext()) {
            int a = input.nextInt();
            int b = input.nextInt();
            int gcd = GCD(a, b);
            int lcm = a / gcd * b;

            System.out.println(gcd + " " + lcm);
        }
    }
    
    public static int GCD (int a, int b) {
        if (b == 0) {
            return a;
        }
        return GCD(b, a % b);
    }
} Main public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        while (input.hasNext()) {
            int a = input.nextInt();
            int b = input.nextInt();
            int gcd = GCD(a, b);
            int lcm = a / gcd * b;

            System.out.println(gcd + " " + lcm);
        }
    } main {
        Scanner input = new Scanner(System.in);

        while (input.hasNext()) {
            int a = input.nextInt();
            int b = input.nextInt();
            int gcd = GCD(a, b);
            int lcm = a / gcd * b;

            System.out.println(gcd + " " + lcm);
        }
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) while (input.hasNext()) {
            int a = input.nextInt();
            int b = input.nextInt();
            int gcd = GCD(a, b);
            int lcm = a / gcd * b;

            System.out.println(gcd + " " + lcm);
        } input.hasNext() input.hasNext input {
            int a = input.nextInt();
            int b = input.nextInt();
            int gcd = GCD(a, b);
            int lcm = a / gcd * b;

            System.out.println(gcd + " " + lcm);
        } int a = input.nextInt(); a input.nextInt() input.nextInt input int b = input.nextInt(); b input.nextInt() input.nextInt input int gcd = GCD(a, b); gcd GCD(a, b) GCD a b int lcm = a / gcd * b; lcm a / gcd * b a / gcd a gcd b System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] args args public static int GCD (int a, int b) {
        if (b == 0) {
            return a;
        }
        return GCD(b, a % b);
    } GCD {
        if (b == 0) {
            return a;
        }
        return GCD(b, a % b);
    } if (b == 0) {
            return a;
        } b == 0 b 0 {
            return a;
        } return a; a return GCD(b, a % b); GCD(b, a % b) GCD b a % b a b int a a int b b
import java.util.*;

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

        while (input.hasNext()) {
            int a = input.nextInt();
            int b = input.nextInt();
            int gcd = GCD(a, b);
            int lcm = a / gcd * b;

            System.out.println(gcd + " " + lcm);
        }
    }
    
    public static int GCD (int a, int b) {
        if (b == 0) {
            return a;
        }
        return GCD(b, a % b);
    }
}