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

while True:
    try:
        a,b = map(int, input().split())
        g = gcd(a,b)
        print("%s %d"%(g,a/g*b))
    except:
        break def gcd(a,b):
    if(b==0):
        return a 
    return gcd(b,a%b) gcd if(b==0):
        return a 
     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())
        g = gcd(a,b)
        print("%s %d"%(g,a/g*b))
    except:
        break True try:
        a,b = map(int, input().split())
        g = gcd(a,b)
        print("%s %d"%(g,a/g*b))
    except:
        break except:
        break break a,b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b g = gcd(a,b) g gcd(a,b) gcd a b print("%s %d"%(g,a/g*b)) print "%s %d"%(g,a/g*b) "%s %d" (g,a/g*b) g a/g*b a/g a g b a,b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b def gcd(a,b):
    if(b==0):
        return a 
    return gcd(b,a%b) def gcd(a,b):
    if(b==0):
        return a 
    return gcd(b,a%b) gcd g = gcd(a,b) gcd(a,b) g
def gcd(a,b):
    if(b==0):
        return a 
    return gcd(b,a%b)

while True:
    try:
        a,b = map(int, input().split())
        g = gcd(a,b)
        print("%s %d"%(g,a/g*b))
    except:
        break
