import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            long tmp = a;
            a = b;
            b = tmp;
        }
        long mod = -1;
        while ((mod = a % b) != 0) {
            a = b;
            b = mod;
        }
        return b;
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            long tmp = a;
            a = b;
            b = tmp;
        }
        long mod = -1;
        while ((mod = a % b) != 0) {
            a = b;
            b = mod;
        }
        return b;
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        }
    } main {
        Scanner scan = new Scanner(System.in);
        try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        } catch (Exception e) {
            System.exit(0);
        } Exception e {
            System.exit(0);
        } System.exit(0) System.exit System 0 {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } String inputData = scan.nextLine(); inputData scan.nextLine() scan.nextLine scan while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            } inputData != null && !"".equals(inputData) inputData != null inputData null !"".equals(inputData) "".equals(inputData) "".equals "" inputData {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            } String[] inputDataSP = inputData.split(" "); inputDataSP inputData.split(" ") inputData.split inputData " " long a = Long.parseLong(inputDataSP[0]); a Long.parseLong(inputDataSP[0]) Long.parseLong Long inputDataSP[0] inputDataSP 0 long b = Long.parseLong(inputDataSP[1]); b Long.parseLong(inputDataSP[1]) Long.parseLong Long inputDataSP[1] inputDataSP 1 long gcd = gcd(a, b); gcd gcd(a, b) gcd a b long lcm = (a * b) / gcd; lcm (a * b) / gcd (a * b) a b gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm inputData = scan.nextLine() inputData scan.nextLine() scan.nextLine scan scan.close() scan.close scan String[] args args private static long gcd(long a, long b) {
        if (a < b) {
            long tmp = a;
            a = b;
            b = tmp;
        }
        long mod = -1;
        while ((mod = a % b) != 0) {
            a = b;
            b = mod;
        }
        return b;
    } gcd {
        if (a < b) {
            long tmp = a;
            a = b;
            b = tmp;
        }
        long mod = -1;
        while ((mod = a % b) != 0) {
            a = b;
            b = mod;
        }
        return b;
    } if (a < b) {
            long tmp = a;
            a = b;
            b = tmp;
        } a < b a b {
            long tmp = a;
            a = b;
            b = tmp;
        } long tmp = a; tmp a a = b a b b = tmp b tmp long mod = -1; mod -1 1 while ((mod = a % b) != 0) {
            a = b;
            b = mod;
        } (mod = a % b) != 0 (mod = a % b) mod a % b a b 0 {
            a = b;
            b = mod;
        } a = b a b b = mod b mod return b; b long a a long b b public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            long tmp = a;
            a = b;
            b = tmp;
        }
        long mod = -1;
        while ((mod = a % b) != 0) {
            a = b;
            b = mod;
        }
        return b;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        }
    }

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

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        try {
            String inputData = scan.nextLine();
            while (inputData != null && !"".equals(inputData)) {
                String[] inputDataSP = inputData.split(" ");
                long a = Long.parseLong(inputDataSP[0]);
                long b = Long.parseLong(inputDataSP[1]);
                long gcd = gcd(a, b);
                long lcm = (a * b) / gcd;
                System.out.println(gcd + " " + lcm);
                inputData = scan.nextLine();
            }
            scan.close();
        } catch (Exception e) {
            System.exit(0);
        }
    }

    private static long gcd(long a, long b) {
        if (a < b) {
            long tmp = a;
            a = b;
            b = tmp;
        }
        long mod = -1;
        while ((mod = a % b) != 0) {
            a = b;
            b = mod;
        }
        return b;
    }
}