import java.util.Scanner;

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

    private static void solve(Scanner in) {
        while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        }
    }

    private static int gcd(int a, int b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        }
    }

    private static int gcd(int a, int b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
} Main public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    } try (Scanner in = new Scanner(System.in)) {
            solve(in);
        } {
            solve(in);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) solve(in) solve in String[] args args private static void solve(Scanner in) {
        while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        }
    } solve {
        while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        }
    } while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        } in.hasNext() in.hasNext in {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        } int a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt(); b in.nextInt() in.nextInt in 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 Scanner in in private 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; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b int a a int b b public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        }
    }

    private static int gcd(int a, int b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            solve(in);
        }
    }

    private static void solve(Scanner in) {
        while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        }
    }

    private static int gcd(int a, int b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
} Main
import java.util.Scanner;

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

    private static void solve(Scanner in) {
        while (in.hasNext()) {
            int a = in.nextInt(), b = in.nextInt();
            int gcd = gcd(a, b);
            int lcm = a / gcd * b;
            System.out.println(gcd + " " + lcm);
        }
    }

    private static int gcd(int a, int b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
}