#! /usr/lib/python3

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

while True:
    try:
        a, b=map(int, input().split())
        s=gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        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 while True:
    try:
        a, b=map(int, input().split())
        s=gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        break True try:
        a, b=map(int, input().split())
        s=gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        break except:
        break break a, b=map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b s=gcd(a,b) s gcd(a,b) gcd a b print("{0} {1:.0f}".format(s,a*b/s)) print "{0} {1:.0f}".format(s,a*b/s) "{0} {1:.0f}".format "{0} {1:.0f}" format s a*b/s a*b a b s a, b=map(int, input().split()) map(int, input().split()) a 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 b=map(int, input().split()) map(int, input().split()) b s=gcd(a,b) gcd(a,b) s
#! /usr/lib/python3

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

while True:
    try:
        a, b=map(int, input().split())
        s=gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        break