while 1:
    try:
        x,y=[int(i) for i in input().split()]
        a=x
        b=y

        while 1:
            c=x%y
            if x%y==0:
                print(y,a*b//y)
                break
            else:
                x=y
                y=c
    except EOFError:
        break while 1:
    try:
        x,y=[int(i) for i in input().split()]
        a=x
        b=y

        while 1:
            c=x%y
            if x%y==0:
                print(y,a*b//y)
                break
            else:
                x=y
                y=c
    except EOFError:
        break 1 try:
        x,y=[int(i) for i in input().split()]
        a=x
        b=y

        while 1:
            c=x%y
            if x%y==0:
                print(y,a*b//y)
                break
            else:
                x=y
                y=c
    except EOFError:
        break except EOFError:
        break break int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i x,y=[int(i) for i in input().split()] x [int(i) for i in input().split()] y a=x a x b=y b y while 1:
            c=x%y
            if x%y==0:
                print(y,a*b//y)
                break
            else:
                x=y
                y=c
     1 c=x%y c x%y x y if x%y==0:
                print(y,a*b//y)
                break
            else:
                x=y
                y=c
     x%y==0 x%y x y 0 print(y,a*b//y) print y a*b//y a*b a b y break x=y x y y=c y c b=y y b x=y y x x,y=[int(i) for i in input().split()] [int(i) for i in input().split()] x y=[int(i) for i in input().split()] [int(i) for i in input().split()] y c=x%y x%y c y=c c y a=x x a
while 1:
    try:
        x,y=[int(i) for i in input().split()]
        a=x
        b=y

        while 1:
            c=x%y
            if x%y==0:
                print(y,a*b//y)
                break
            else:
                x=y
                y=c
    except EOFError:
        break