import java.util.Scanner;

public class Main {

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

        while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        }
    }

    static int GetGcd(int left, int right) {
        while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        }

        return left;
    }

    static int GetLcm(int left, int right) {
        return left / GetGcd(left, right) * right;
    }

    static int GetLcm(int left, int right, int gcd) {
        return left / gcd * right;
    }

} import java.util.Scanner; Scanner java.util public class Main {

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

        while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        }
    }

    static int GetGcd(int left, int right) {
        while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        }

        return left;
    }

    static int GetLcm(int left, int right) {
        return left / GetGcd(left, right) * right;
    }

    static int GetLcm(int left, int right, int gcd) {
        return left / gcd * right;
    }

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

        while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

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

        while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        } scanner.hasNext() scanner.hasNext scanner {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        } final int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner final int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner final int gcd = GetGcd(a, b); gcd GetGcd(a, b) GetGcd a b final int lcm = GetLcm(a, b, gcd); lcm GetLcm(a, b, gcd) GetLcm 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 static int GetGcd(int left, int right) {
        while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        }

        return left;
    } GetGcd {
        while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        }

        return left;
    } while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        } right > 0 right 0 {
            final int tmp = left % right;
            left = right;
            right = tmp;
        } final int tmp = left % right; tmp left % right left right left = right left right right = tmp right tmp return left; left int left left int right right static int GetLcm(int left, int right) {
        return left / GetGcd(left, right) * right;
    } GetLcm {
        return left / GetGcd(left, right) * right;
    } return left / GetGcd(left, right) * right; left / GetGcd(left, right) * right left / GetGcd(left, right) left GetGcd(left, right) GetGcd left right right int left left int right right static int GetLcm(int left, int right, int gcd) {
        return left / gcd * right;
    } GetLcm {
        return left / gcd * right;
    } return left / gcd * right; left / gcd * right left / gcd left gcd right int left left int right right int gcd gcd public class Main {

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

        while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        }
    }

    static int GetGcd(int left, int right) {
        while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        }

        return left;
    }

    static int GetLcm(int left, int right) {
        return left / GetGcd(left, right) * right;
    }

    static int GetLcm(int left, int right, int gcd) {
        return left / gcd * right;
    }

} public class Main {

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

        while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        }
    }

    static int GetGcd(int left, int right) {
        while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        }

        return left;
    }

    static int GetLcm(int left, int right) {
        return left / GetGcd(left, right) * right;
    }

    static int GetLcm(int left, int right, int gcd) {
        return left / gcd * right;
    }

} Main
import java.util.Scanner;

public class Main {

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

        while (scanner.hasNext()) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();

            final int gcd = GetGcd(a, b);
            final int lcm = GetLcm(a, b, gcd);

            System.out.println(gcd + " " + lcm);
        }
    }

    static int GetGcd(int left, int right) {
        while (right > 0) {
            final int tmp = left % right;
            left = right;
            right = tmp;
        }

        return left;
    }

    static int GetLcm(int left, int right) {
        return left / GetGcd(left, right) * right;
    }

    static int GetLcm(int left, int right, int gcd) {
        return left / gcd * right;
    }

}