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

try:
    while 1:
        a,b = list(map(int,input().split()))
        c = gcd(a, b)
        print('{} {}'.format(c,int(c * (a/c) * (b/c))))

except Exception:
    pass def gcd(a, b):
    if a > b:
        a, b = b, a
    if a == 0:
        return b
    else:
        return gcd(b % a, a) gcd if a > b:
        a, b = b, a
     a > b a b a, b = b, a a b b a if a == 0:
        return b
    else:
        return gcd(b % a, a) a == 0 a 0 return b b return gcd(b % a, a) gcd(b % a, a) gcd b % a b a a a a b b try:
    while 1:
        a,b = list(map(int,input().split()))
        c = gcd(a, b)
        print('{} {}'.format(c,int(c * (a/c) * (b/c))))

except Exception:
    pass except Exception:
    pass while 1:
        a,b = list(map(int,input().split()))
        c = gcd(a, b)
        print('{} {}'.format(c,int(c * (a/c) * (b/c)))) 1 a,b = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split b c = gcd(a, b) c gcd(a, b) gcd a b print('{} {}'.format(c,int(c * (a/c) * (b/c)))) print '{} {}'.format(c,int(c * (a/c) * (b/c))) '{} {}'.format '{} {}' format c int(c * (a/c) * (b/c)) int c * (a/c) * (b/c) c * (a/c) c a/c a c b/c b c a,b = list(map(int,input().split())) list(map(int,input().split())) a def gcd(a, b):
    if a > b:
        a, b = b, a
    if a == 0:
        return b
    else:
        return gcd(b % a, a) def gcd(a, b):
    if a > b:
        a, b = b, a
    if a == 0:
        return b
    else:
        return gcd(b % a, a) gcd c = gcd(a, b) gcd(a, b) c b = list(map(int,input().split())) list(map(int,input().split())) b
def gcd(a, b):
    if a > b:
        a, b = b, a
    if a == 0:
        return b
    else:
        return gcd(b % a, a)

try:
    while 1:
        a,b = list(map(int,input().split()))
        c = gcd(a, b)
        print('{} {}'.format(c,int(c * (a/c) * (b/c))))

except Exception:
    pass