import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {

    static int gcd(int a, int b)
    {
        int t = a % b;
        while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        }

        return b;
    }
    public static void main(String[] args)
    {
        int a, b, g;

        long l;

        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        }

    }
}
 import java.io.BufferedInputStream; BufferedInputStream java.io import java.util.Scanner; Scanner java.util public class Main {

    static int gcd(int a, int b)
    {
        int t = a % b;
        while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        }

        return b;
    }
    public static void main(String[] args)
    {
        int a, b, g;

        long l;

        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        }

    }
} Main static int gcd(int a, int b)
    {
        int t = a % b;
        while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        }

        return b;
    } gcd {
        int t = a % b;
        while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        }

        return b;
    } int t = a % b; t a % b a b while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        } t != 0 t 0 {
            a = b;
            b = t;
            t = a % b;
        } a = b a b b = t b t t = a % b t a % b a b return b; b int a a int b b public static void main(String[] args)
    {
        int a, b, g;

        long l;

        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        }

    } main {
        int a, b, g;

        long l;

        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        }

    } int a a b b g; g long l; l Scanner cin = new Scanner(new BufferedInputStream(System.in)); cin new Scanner(new BufferedInputStream(System.in)) while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        } cin.hasNext() cin.hasNext cin {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        } a = cin.nextInt() a cin.nextInt() cin.nextInt cin b = cin.nextInt() b cin.nextInt() cin.nextInt cin g = gcd(a, b) g gcd(a, b) gcd a b l = 1L * a*b / g l 1L * a*b / g 1L * a*b 1L * a*b 1L a b g System.out.print(g+" ") System.out.print System.out System System.out g+" " g " " System.out.println(new Long(l).toString()) System.out.println System.out System System.out new Long(l).toString() new Long(l).toString new Long(l) String[] args args public class Main {

    static int gcd(int a, int b)
    {
        int t = a % b;
        while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        }

        return b;
    }
    public static void main(String[] args)
    {
        int a, b, g;

        long l;

        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        }

    }
} public class Main {

    static int gcd(int a, int b)
    {
        int t = a % b;
        while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        }

        return b;
    }
    public static void main(String[] args)
    {
        int a, b, g;

        long l;

        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        }

    }
} Main
import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {

    static int gcd(int a, int b)
    {
        int t = a % b;
        while(t != 0)
        {
            a = b;
            b = t;
            t = a % b;
        }

        return b;
    }
    public static void main(String[] args)
    {
        int a, b, g;

        long l;

        Scanner cin = new Scanner(new BufferedInputStream(System.in));

        while(cin.hasNext())
        {
            a = cin.nextInt();
            b = cin.nextInt();

            g = gcd(a, b);
            l = 1L * a*b / g;
            System.out.print(g+" ");
            System.out.println(new Long(l).toString());
        }

    }
}

