import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }
} Main public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        }
    } main {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        }
    } Scanner sn = new Scanner(System.in); sn new Scanner(System.in) while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        } sn.hasNext() sn.hasNext sn {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        } long a = sn.nextLong(); a sn.nextLong() sn.nextLong sn long b = sn.nextLong(); b sn.nextLong() sn.nextLong sn System.out.printf("%d %d\n", gcd(a, b), lcm(a, b)) System.out.printf System.out System System.out "%d %d\n" gcd(a, b) gcd a b lcm(a, b) lcm a b String[] args args public static long gcd(long a, long 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 long a a long b b public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    } lcm {
        return a * b / gcd(a, b);
    } return a * b / gcd(a, b); a * b / gcd(a, b) a * b a b gcd(a, b) gcd a b long a a long b b public class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            long a = sn.nextLong();
            long b = sn.nextLong();
            System.out.printf("%d %d\n", gcd(a, b), lcm(a, b));
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long lcm(long a, long b) {
        return a * b / gcd(a, b);
    }
}