def gcm(a, b):
    if a<b: a,b = b,a

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

def lcm(a, b):
    return a/gcm(a,b)*b

while True:
    try:
        a, b = map(int, raw_input().split())
    except:
        break
    print "%d %d" %(gcm(a,b), lcm(a,b)) def gcm(a, b):
    if a<b: a,b = b,a

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

     a<b a b if (a%b ==0):
        return b
    else:
        return gcm(b, a%b) a%b ==0 a%b a b 0 return b b return gcm(b, a%b) gcm(b, a%b) gcm b a%b a b a a b b def lcm(a, b):
    return a/gcm(a,b)*b lcm return a/gcm(a,b)*b a/gcm(a,b)*b a/gcm(a,b) a gcm(a,b) gcm a b b a a b b while True:
    try:
        a, b = map(int, raw_input().split())
    except:
        break
    print "%d %d" %(gcm(a,b), lcm(a,b)) True try:
        a, b = map(int, raw_input().split())
    except:
        break
     except:
        break
     break a, b = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b print "%d %d" %(gcm(a,b), lcm(a,b)) "%d %d" (gcm(a,b), lcm(a,b)) gcm(a,b) gcm a b lcm(a,b) lcm a b def gcm(a, b):
    if a<b: a,b = b,a

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

    if (a%b ==0):
        return b
    else:
        return gcm(b, a%b) gcm def lcm(a, b):
    return a/gcm(a,b)*b def lcm(a, b):
    return a/gcm(a,b)*b lcm b = map(int, raw_input().split()) map(int, raw_input().split()) b a, b = map(int, raw_input().split()) map(int, raw_input().split()) a
def gcm(a, b):
    if a<b: a,b = b,a

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

def lcm(a, b):
    return a/gcm(a,b)*b

while True:
    try:
        a, b = map(int, raw_input().split())
    except:
        break
    print "%d %d" %(gcm(a,b), lcm(a,b))