import java.util.*;

public class Main
{
    private static int gcd(int x, int y)
    {
        if (0 == y)
            return x;
        return gcd(y, x % y);
    }

    private static int lcm(int x, int y)
    {
        return x  / gcd(x, y) * y;
    }

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

        while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        }
    }
} import java.util.*; util.* java public class Main
{
    private static int gcd(int x, int y)
    {
        if (0 == y)
            return x;
        return gcd(y, x % y);
    }

    private static int lcm(int x, int y)
    {
        return x  / gcd(x, y) * y;
    }

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

        while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        }
    }
} Main private static int gcd(int x, int y)
    {
        if (0 == y)
            return x;
        return gcd(y, x % y);
    } gcd {
        if (0 == y)
            return x;
        return gcd(y, x % y);
    } if (0 == y)
            return x; 0 == y 0 y return x; x return gcd(y, x % y); gcd(y, x % y) gcd y x % y x y int x x int y y private static int lcm(int x, int y)
    {
        return x  / gcd(x, y) * y;
    } lcm {
        return x  / gcd(x, y) * y;
    } return x  / gcd(x, y) * y; x  / gcd(x, y) * y x  / gcd(x, y) x gcd(x, y) gcd x y y int x x int y y public static void main(String[] main)
    {
        Scanner in = new Scanner(System.in);

        while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        }
    } main {
        Scanner in = new Scanner(System.in);

        while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        } in.hasNext() in.hasNext in {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        } int x = in.nextInt(); x in.nextInt() in.nextInt in int y = in.nextInt(); y in.nextInt() in.nextInt in System.out.print(gcd(x, y) + " " + lcm(x, y)) System.out.print System.out System System.out gcd(x, y) + " " + lcm(x, y) gcd(x, y) + " " + lcm(x, y) gcd(x, y) gcd x y " " lcm(x, y) lcm x y System.out.println() System.out.println System.out System System.out String[] main main public class Main
{
    private static int gcd(int x, int y)
    {
        if (0 == y)
            return x;
        return gcd(y, x % y);
    }

    private static int lcm(int x, int y)
    {
        return x  / gcd(x, y) * y;
    }

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

        while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        }
    }
} public class Main
{
    private static int gcd(int x, int y)
    {
        if (0 == y)
            return x;
        return gcd(y, x % y);
    }

    private static int lcm(int x, int y)
    {
        return x  / gcd(x, y) * y;
    }

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

        while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        }
    }
} Main
import java.util.*;

public class Main
{
    private static int gcd(int x, int y)
    {
        if (0 == y)
            return x;
        return gcd(y, x % y);
    }

    private static int lcm(int x, int y)
    {
        return x  / gcd(x, y) * y;
    }

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

        while (in.hasNext())
        {
            int x = in.nextInt();
            int y = in.nextInt();

            System.out.print(gcd(x, y) + " " + lcm(x, y));
            System.out.println();
        }
    }
}