import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    private static final String blank = " ";

    public static void main(String[] args) {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String input = null;

        try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static int resolveGcd(int num1, int num2) {

        int result = num1 % num2;

        if (result == 0) {
            return num2;
        }

        return resolveGcd(num2, result);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    private static final String blank = " ";

    public static void main(String[] args) {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String input = null;

        try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static int resolveGcd(int num1, int num2) {

        int result = num1 % num2;

        if (result == 0) {
            return num2;
        }

        return resolveGcd(num2, result);
    }
} Main private static final String blank = " "; blank " " public static void main(String[] args) {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String input = null;

        try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    } main {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String input = null;

        try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String input = null; input null try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        } try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                in.close();
            } in.close() in.close in {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            } (input = in.readLine()) != null (input = in.readLine()) input in.readLine() in.readLine in null {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            } String[] problemData = input.split(blank); problemData input.split(blank) input.split input blank int num1 = Integer.valueOf(problemData[0]); num1 Integer.valueOf(problemData[0]) Integer.valueOf Integer problemData[0] problemData 0 int num2 = Integer.valueOf(problemData[1]); num2 Integer.valueOf(problemData[1]) Integer.valueOf Integer problemData[1] problemData 1 int gcd = resolveGcd(num1, num2); gcd resolveGcd(num1, num2) resolveGcd num1 num2 long lcm = (long) (num1 / gcd * num2); lcm (long) (num1 / gcd * num2) num1 / gcd num1 gcd num2 System.out.println(gcd + blank + lcm) System.out.println System.out System System.out gcd + blank + lcm gcd + blank + lcm gcd blank lcm String[] args args private static int resolveGcd(int num1, int num2) {

        int result = num1 % num2;

        if (result == 0) {
            return num2;
        }

        return resolveGcd(num2, result);
    } resolveGcd {

        int result = num1 % num2;

        if (result == 0) {
            return num2;
        }

        return resolveGcd(num2, result);
    } int result = num1 % num2; result num1 % num2 num1 num2 if (result == 0) {
            return num2;
        } result == 0 result 0 {
            return num2;
        } return num2; num2 return resolveGcd(num2, result); resolveGcd(num2, result) resolveGcd num2 result int num1 num1 int num2 num2 public class Main {

    private static final String blank = " ";

    public static void main(String[] args) {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String input = null;

        try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static int resolveGcd(int num1, int num2) {

        int result = num1 % num2;

        if (result == 0) {
            return num2;
        }

        return resolveGcd(num2, result);
    }
} public class Main {

    private static final String blank = " ";

    public static void main(String[] args) {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String input = null;

        try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static int resolveGcd(int num1, int num2) {

        int result = num1 % num2;

        if (result == 0) {
            return num2;
        }

        return resolveGcd(num2, result);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    private static final String blank = " ";

    public static void main(String[] args) {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String input = null;

        try {
            while ((input = in.readLine()) != null) {

                String[] problemData = input.split(blank);

                int num1 = Integer.valueOf(problemData[0]);
                int num2 = Integer.valueOf(problemData[1]);

                int gcd = resolveGcd(num1, num2);
                long lcm = (long) (num1 / gcd * num2);

                System.out.println(gcd + blank + lcm);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static int resolveGcd(int num1, int num2) {

        int result = num1 % num2;

        if (result == 0) {
            return num2;
        }

        return resolveGcd(num2, result);
    }
}