import java.io.PrintStream;
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    }

    static void doit(String[] args, Scanner scanner, PrintStream out) {
        while (scanner.hasNext()) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long gcd = gcd(a, b);
            long lcm = a * b / gcd;
            out.println(String.format("%d %d", gcd, lcm));
        }
    }

    static long gcd(long a, long b) {
        long large = Math.max(a, b);
        long small = Math.min(a, b);
        while (true) {
            long r = large % small;
            if (r == 0) {
                return small;
            }
            large = small;
            small = r;
        }
    }
} import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util class Main {

    public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    }

    static void doit(String[] args, Scanner scanner, PrintStream out) {
        while (scanner.hasNext()) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long gcd = gcd(a, b);
            long lcm = a * b / gcd;
            out.println(String.format("%d %d", gcd, lcm));
        }
    }

    static long gcd(long a, long b) {
        long large = Math.max(a, b);
        long small = Math.min(a, b);
        while (true) {
            long r = large % small;
            if (r == 0) {
                return small;
            }
            large = small;
            small = r;
        }
    }
} Main public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    } main {
        doit(args, new Scanner(System.in), System.out);
    } doit(args, new Scanner(System.in), System.out) doit args new Scanner(System.in) System.out System System.out String[] args args static void doit(String[] args, Scanner scanner, PrintStream out) {
        while (scanner.hasNext()) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long gcd = gcd(a, b);
            long lcm = a * b / gcd;
            out.println(String.format("%d %d", gcd, lcm));
        }
    } doit {
        while (scanner.hasNext()) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long gcd = gcd(a, b);
            long lcm = a * b / gcd;
            out.println(String.format("%d %d", gcd, lcm));
        }
    } while (scanner.hasNext()) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long gcd = gcd(a, b);
            long lcm = a * b / gcd;
            out.println(String.format("%d %d", gcd, lcm));
        } scanner.hasNext() scanner.hasNext scanner {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long gcd = gcd(a, b);
            long lcm = a * b / gcd;
            out.println(String.format("%d %d", gcd, lcm));
        } long a = scanner.nextLong(); a scanner.nextLong() scanner.nextLong scanner long b = scanner.nextLong(); b scanner.nextLong() scanner.nextLong scanner long gcd = gcd(a, b); gcd gcd(a, b) gcd a b long lcm = a * b / gcd; lcm a * b / gcd a * b a b gcd out.println(String.format("%d %d", gcd, lcm)) out.println out String.format("%d %d", gcd, lcm) String.format String "%d %d" gcd lcm String[] args args Scanner scanner scanner PrintStream out out static long gcd(long a, long b) {
        long large = Math.max(a, b);
        long small = Math.min(a, b);
        while (true) {
            long r = large % small;
            if (r == 0) {
                return small;
            }
            large = small;
            small = r;
        }
    } gcd {
        long large = Math.max(a, b);
        long small = Math.min(a, b);
        while (true) {
            long r = large % small;
            if (r == 0) {
                return small;
            }
            large = small;
            small = r;
        }
    } long large = Math.max(a, b); large Math.max(a, b) Math.max Math a b long small = Math.min(a, b); small Math.min(a, b) Math.min Math a b while (true) {
            long r = large % small;
            if (r == 0) {
                return small;
            }
            large = small;
            small = r;
        } true {
            long r = large % small;
            if (r == 0) {
                return small;
            }
            large = small;
            small = r;
        } long r = large % small; r large % small large small if (r == 0) {
                return small;
            } r == 0 r 0 {
                return small;
            } return small; small large = small large small small = r small r long a a long b b
import java.io.PrintStream;
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        doit(args, new Scanner(System.in), System.out);
    }

    static void doit(String[] args, Scanner scanner, PrintStream out) {
        while (scanner.hasNext()) {
            long a = scanner.nextLong();
            long b = scanner.nextLong();
            long gcd = gcd(a, b);
            long lcm = a * b / gcd;
            out.println(String.format("%d %d", gcd, lcm));
        }
    }

    static long gcd(long a, long b) {
        long large = Math.max(a, b);
        long small = Math.min(a, b);
        while (true) {
            long r = large % small;
            if (r == 0) {
                return small;
            }
            large = small;
            small = r;
        }
    }
}