import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AizuGCDLCM solver = new AizuGCDLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class AizuGCDLCM {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        }

        private int gcd(int x, int y) {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        }

    }
}

 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AizuGCDLCM solver = new AizuGCDLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class AizuGCDLCM {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        }

        private int gcd(int x, int y) {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AizuGCDLCM solver = new AizuGCDLCM();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AizuGCDLCM solver = new AizuGCDLCM();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) AizuGCDLCM solver = new AizuGCDLCM(); solver new AizuGCDLCM() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class AizuGCDLCM {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        }

        private int gcd(int x, int y) {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        }

    } AizuGCDLCM public void solve(int testNumber, Scanner in, PrintWriter out) {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        } solve {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        } while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            } in.hasNext() in.hasNext in {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            } int x = in.nextInt(); x in.nextInt() in.nextInt in int y = in.nextInt(); y in.nextInt() in.nextInt in int g = gcd(x, y); g gcd(x, y) gcd x y long p = (long) x * y; p (long) x * y (long) x y long l = p / g; l p / g p g out.printf("%d %d\n", g, l) out.printf out "%d %d\n" g l int testNumber testNumber Scanner in in PrintWriter out out private int gcd(int x, int y) {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        } gcd {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        } while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            } y != 0 y 0 {
                int t = x % y;
                x = y;
                y = t;
            } int t = x % y; t x % y x y x = y x y y = t y t return x; x int x x int y y public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AizuGCDLCM solver = new AizuGCDLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class AizuGCDLCM {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        }

        private int gcd(int x, int y) {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AizuGCDLCM solver = new AizuGCDLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class AizuGCDLCM {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        }

        private int gcd(int x, int y) {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AizuGCDLCM solver = new AizuGCDLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class AizuGCDLCM {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            while (in.hasNext()) {
                int x = in.nextInt();
                int y = in.nextInt();

                int g = gcd(x, y);
                long p = (long) x * y;
                long l = p / g;

                out.printf("%d %d\n", g, l);
            }
        }

        private int gcd(int x, int y) {
            while (y != 0) {
                int t = x % y;
                x = y;
                y = t;
            }

            return x;
        }

    }
}


