#2-8
while True:
    try:

        def gcd(a,b):
            if b == 0:
                return a
            else:
                return gcd(b,a%b)

        a = list(map(int,input().split()))
        a.sort()
        a.reverse()
        ans1 = gcd(a[0],a[1])
        ans2 = int(a[0]*a[1]/ans1)

        print(ans1,ans2)
    except:
        break while True:
    try:

        def gcd(a,b):
            if b == 0:
                return a
            else:
                return gcd(b,a%b)

        a = list(map(int,input().split()))
        a.sort()
        a.reverse()
        ans1 = gcd(a[0],a[1])
        ans2 = int(a[0]*a[1]/ans1)

        print(ans1,ans2)
    except:
        break True try:

        def gcd(a,b):
            if b == 0:
                return a
            else:
                return gcd(b,a%b)

        a = list(map(int,input().split()))
        a.sort()
        a.reverse()
        ans1 = gcd(a[0],a[1])
        ans2 = int(a[0]*a[1]/ans1)

        print(ans1,ans2)
    except:
        break except:
        break break def gcd(a,b):
            if b == 0:
                return a
            else:
                return gcd(b,a%b)

         gcd if b == 0:
                return a
            else:
                return gcd(b,a%b)

         b == 0 b 0 return a a return gcd(b,a%b) gcd(b,a%b) gcd b a%b a b a a b b a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a.sort() a.sort a sort a.reverse() a.reverse a reverse ans1 = gcd(a[0],a[1]) ans1 gcd(a[0],a[1]) gcd a[0] a 0 a[1] a 1 ans2 = int(a[0]*a[1]/ans1) ans2 int(a[0]*a[1]/ans1) int a[0]*a[1]/ans1 a[0]*a[1] a[0] a 0 a[1] a 1 ans1 print(ans1,ans2) print ans1 ans2 def gcd(a,b):
            if b == 0:
                return a
            else:
                return gcd(b,a%b)

         def gcd(a,b):
            if b == 0:
                return a
            else:
                return gcd(b,a%b)

         gcd ans1 = gcd(a[0],a[1]) gcd(a[0],a[1]) ans1 a = list(map(int,input().split())) list(map(int,input().split())) a ans2 = int(a[0]*a[1]/ans1) int(a[0]*a[1]/ans1) ans2
#2-8
while True:
    try:

        def gcd(a,b):
            if b == 0:
                return a
            else:
                return gcd(b,a%b)

        a = list(map(int,input().split()))
        a.sort()
        a.reverse()
        ans1 = gcd(a[0],a[1])
        ans2 = int(a[0]*a[1]/ans1)

        print(ans1,ans2)
    except:
        break
