def gcd(m,n):  
    while m%n>0:
        m,n=n,m%n
    else:
        return n

while True:
    try:    
        a,b = map(int,raw_input().split())
        a,b = max(a,b),min(a,b)
        g = gcd(a,b)
        l = a*b/g
        print "%d %d" % (g, l)
    except EOFError: 
        break def gcd(m,n):  
    while m%n>0:
        m,n=n,m%n
    else:
        return n gcd while m%n>0:
        m,n=n,m%n
    else:
        return n m%n>0 m%n m n 0 m,n=n,m%n m n n m%n m n return n n m m n n while True:
    try:    
        a,b = map(int,raw_input().split())
        a,b = max(a,b),min(a,b)
        g = gcd(a,b)
        l = a*b/g
        print "%d %d" % (g, l)
    except EOFError: 
        break True try:    
        a,b = map(int,raw_input().split())
        a,b = max(a,b),min(a,b)
        g = gcd(a,b)
        l = a*b/g
        print "%d %d" % (g, l)
    except EOFError: 
        break except EOFError: 
        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 a,b = max(a,b),min(a,b) a max(a,b) max a b b min(a,b) min a b g = gcd(a,b) g gcd(a,b) gcd a b l = a*b/g l a*b/g a*b a b g print "%d %d" % (g, l) "%d %d" (g, l) g l def gcd(m,n):  
    while m%n>0:
        m,n=n,m%n
    else:
        return n def gcd(m,n):  
    while m%n>0:
        m,n=n,m%n
    else:
        return n gcd b = map(int,raw_input().split()) map(int,raw_input().split()) b b = max(a,b),min(a,b) min(a,b) b a,b = map(int,raw_input().split()) map(int,raw_input().split()) a a,b = max(a,b),min(a,b) max(a,b) a g = gcd(a,b) gcd(a,b) g l = a*b/g a*b/g l
def gcd(m,n):  
    while m%n>0:
        m,n=n,m%n
    else:
        return n

while True:
    try:    
        a,b = map(int,raw_input().split())
        a,b = max(a,b),min(a,b)
        g = gcd(a,b)
        l = a*b/g
        print "%d %d" % (g, l)
    except EOFError: 
        break