def F(x, y):
    if x % y == 0:
        return y
    return F(y, x % y)
while True:
    try:
        x, y = map(int,input().split())
        print('{0} {1}'.format(F(x, y), int(x * y / F(x, y))))
    except EOFError:
        break
 def F(x, y):
    if x % y == 0:
        return y
    return F(y, x % y) F if x % y == 0:
        return y
     x % y == 0 x % y x y 0 return y y return F(y, x % y) F(y, x % y) F y x % y x y x x y y while True:
    try:
        x, y = map(int,input().split())
        print('{0} {1}'.format(F(x, y), int(x * y / F(x, y))))
    except EOFError:
        break True try:
        x, y = map(int,input().split())
        print('{0} {1}'.format(F(x, y), int(x * y / F(x, y))))
    except EOFError:
        break except EOFError:
        break break x, y = map(int,input().split()) x map(int,input().split()) map int input().split() ().split () input split y print('{0} {1}'.format(F(x, y), int(x * y / F(x, y)))) print '{0} {1}'.format(F(x, y), int(x * y / F(x, y))) '{0} {1}'.format '{0} {1}' format F(x, y) F x y int(x * y / F(x, y)) int x * y / F(x, y) x * y x y F(x, y) F x y def F(x, y):
    if x % y == 0:
        return y
    return F(y, x % y) def F(x, y):
    if x % y == 0:
        return y
    return F(y, x % y) F x, y = map(int,input().split()) map(int,input().split()) x y = map(int,input().split()) map(int,input().split()) y
def F(x, y):
    if x % y == 0:
        return y
    return F(y, x % y)
while True:
    try:
        x, y = map(int,input().split())
        print('{0} {1}'.format(F(x, y), int(x * y / F(x, y))))
    except EOFError:
        break

