def main():
    while True:
        try:
            a, b = map(int, input().split())
            
            gcd = rec(a, b)
            lcm = a * b / gcd

            print(gcd, int(lcm))
        except:
            break

def rec(i, j):
    if i % j == 0:
        return j
    return rec(j, i % j)

if __name__ == '__main__':
    main() def main():
    while True:
        try:
            a, b = map(int, input().split())
            
            gcd = rec(a, b)
            lcm = a * b / gcd

            print(gcd, int(lcm))
        except:
            break main while True:
        try:
            a, b = map(int, input().split())
            
            gcd = rec(a, b)
            lcm = a * b / gcd

            print(gcd, int(lcm))
        except:
            break True try:
            a, b = map(int, input().split())
            
            gcd = rec(a, b)
            lcm = a * b / gcd

            print(gcd, int(lcm))
        except:
            break except:
            break break a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b gcd = rec(a, b) gcd rec(a, b) rec a b lcm = a * b / gcd lcm a * b / gcd a * b a b gcd print(gcd, int(lcm)) print gcd int(lcm) int lcm def rec(i, j):
    if i % j == 0:
        return j
    return rec(j, i % j) rec if i % j == 0:
        return j
     i % j == 0 i % j i j 0 return j j return rec(j, i % j) rec(j, i % j) rec j i % j i j i i j j if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def rec(i, j):
    if i % j == 0:
        return j
    return rec(j, i % j) def rec(i, j):
    if i % j == 0:
        return j
    return rec(j, i % j) rec def main():
    while True:
        try:
            a, b = map(int, input().split())
            
            gcd = rec(a, b)
            lcm = a * b / gcd

            print(gcd, int(lcm))
        except:
            break def main():
    while True:
        try:
            a, b = map(int, input().split())
            
            gcd = rec(a, b)
            lcm = a * b / gcd

            print(gcd, int(lcm))
        except:
            break main
def main():
    while True:
        try:
            a, b = map(int, input().split())
            
            gcd = rec(a, b)
            lcm = a * b / gcd

            print(gcd, int(lcm))
        except:
            break

def rec(i, j):
    if i % j == 0:
        return j
    return rec(j, i % j)

if __name__ == '__main__':
    main()