import java.util.Scanner;

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

        while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        }
        
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        
        return a;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        }
        
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        
        return a;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        }
    } main {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        } sc.hasNext() sc.hasNext sc {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        } long a = Long.parseLong(sc.next()); a Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long b = Long.parseLong(sc.next()); b Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long g = gcd(a, b); g gcd(a, b) gcd a b System.out.println(g + " " + (a / g * b)) System.out.println System.out System System.out g + " " + (a / g * b) g + " " + (a / g * b) g " " (a / g * b) a / g a g b String[] args args private static long gcd(long a, long b) {
        if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        }
        
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        
        return a;
    } gcd {
        if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        }
        
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        
        return a;
    } if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        } a < b a b {
            a ^= b;
            b ^= a;
            a ^= b;
        } a ^= b a b b ^= a b a a ^= b a b while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        } b != 0 b 0 {
            long r = a % b;
            a = b;
            b = r;
        } long r = a % b; r a % b a b a = b a b b = r b r return a; a long a a long b b public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        }
        
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        
        return a;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        }
        
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        
        return a;
    }
} Main
import java.util.Scanner;

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

        while(sc.hasNext()) {
            long a = Long.parseLong(sc.next());
            long b = Long.parseLong(sc.next());
            long g = gcd(a, b);

            System.out.println(g + " " + (a / g * b));
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            a ^= b;
            b ^= a;
            a ^= b;
        }
        
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        
        return a;
    }
}