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


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

try:
    while True:
        a, b = map(int, raw_input().split())
        print gcd(a, b), lcm(a, b)
except:
    pass def gcd(a, b):
    return a if b == 0 else gcd(b, a % b) gcd return a if b == 0 else gcd(b, a % b) a if b == 0 else gcd(b, a % b) b == 0 b 0 a gcd(b, a % b) gcd b a % b a b a a b b def lcm(a, b):
    return a / gcd(a, b) * b lcm return a / gcd(a, b) * b a / gcd(a, b) * b a / gcd(a, b) a gcd(a, b) gcd a b b a a b b try:
    while True:
        a, b = map(int, raw_input().split())
        print gcd(a, b), lcm(a, b)
except:
    pass except:
    pass while True:
        a, b = map(int, raw_input().split())
        print gcd(a, b), lcm(a, b) True a, b = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b print gcd(a, b) gcd a b lcm(a, b) lcm a b a, b = map(int, raw_input().split()) map(int, raw_input().split()) a def gcd(a, b):
    return a if b == 0 else gcd(b, a % b) def gcd(a, b):
    return a if b == 0 else gcd(b, a % b) gcd def lcm(a, b):
    return a / gcd(a, b) * b def lcm(a, b):
    return a / gcd(a, b) * b lcm b = map(int, raw_input().split()) map(int, raw_input().split()) b
def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)


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

try:
    while True:
        a, b = map(int, raw_input().split())
        print gcd(a, b), lcm(a, b)
except:
    pass