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

def main():
    while 1:
        try:
            a = list(map(int, input().split()))
            b = gcd(a[0],a[1])
            c = a[0]/b*a[1]
            print('%s %d' % (b,c))
        except:
            break
            
if __name__ == "__main__":
    main() 
 def gcd(a:int, b:int):
    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:int a b:int b def main():
    while 1:
        try:
            a = list(map(int, input().split()))
            b = gcd(a[0],a[1])
            c = a[0]/b*a[1]
            print('%s %d' % (b,c))
        except:
            break
             main while 1:
        try:
            a = list(map(int, input().split()))
            b = gcd(a[0],a[1])
            c = a[0]/b*a[1]
            print('%s %d' % (b,c))
        except:
            break
             1 try:
            a = list(map(int, input().split()))
            b = gcd(a[0],a[1])
            c = a[0]/b*a[1]
            print('%s %d' % (b,c))
        except:
            break
             except:
            break
             break a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split b = gcd(a[0],a[1]) b gcd(a[0],a[1]) gcd a[0] a 0 a[1] a 1 c = a[0]/b*a[1] c a[0]/b*a[1] a[0]/b a[0] a 0 b a[1] a 1 print('%s %d' % (b,c)) print '%s %d' % (b,c) '%s %d' (b,c) b c if __name__ == "__main__":
    main()  __name__ == "__main__" __name__ "__main__" main() main def gcd(a:int, b:int):
    if b == 0:
        return a
    
    return gcd(b,a%b) def gcd(a:int, b:int):
    if b == 0:
        return a
    
    return gcd(b,a%b) gcd def main():
    while 1:
        try:
            a = list(map(int, input().split()))
            b = gcd(a[0],a[1])
            c = a[0]/b*a[1]
            print('%s %d' % (b,c))
        except:
            break
             def main():
    while 1:
        try:
            a = list(map(int, input().split()))
            b = gcd(a[0],a[1])
            c = a[0]/b*a[1]
            print('%s %d' % (b,c))
        except:
            break
             main
def gcd(a:int, b:int):
    if b == 0:
        return a
    
    return gcd(b,a%b)

def main():
    while 1:
        try:
            a = list(map(int, input().split()))
            b = gcd(a[0],a[1])
            c = a[0]/b*a[1]
            print('%s %d' % (b,c))
        except:
            break
            
if __name__ == "__main__":
    main() 

