def gcd(a,b):
    while b != 0:
        a , b = b , a % b
    return a
def lcm(a,b):
    return int(abs(a*b) / gcd(a,b))

while True:
    try:
        a, b = [int(x) for x in input().split()]
    except:
        exit()
    print(gcd(a,b),lcm(a,b)) def gcd(a,b):
    while b != 0:
        a , b = b , a % b
    return a gcd while b != 0:
        a , b = b , a % b
     b != 0 b 0 a , b = b , a % b a b b a % b a b return a a a a b b def lcm(a,b):
    return int(abs(a*b) / gcd(a,b)) lcm return int(abs(a*b) / gcd(a,b)) int(abs(a*b) / gcd(a,b)) int abs(a*b) / gcd(a,b) abs(a*b) abs a*b a b gcd(a,b) gcd a b a a b b while True:
    try:
        a, b = [int(x) for x in input().split()]
    except:
        exit()
    print(gcd(a,b),lcm(a,b)) True try:
        a, b = [int(x) for x in input().split()]
    except:
        exit()
     except:
        exit()
     exit() exit int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a, b = [int(x) for x in input().split()] a [int(x) for x in input().split()] b print(gcd(a,b),lcm(a,b)) print gcd(a,b) gcd a b lcm(a,b) lcm a b def lcm(a,b):
    return int(abs(a*b) / gcd(a,b)) def lcm(a,b):
    return int(abs(a*b) / gcd(a,b)) lcm b = [int(x) for x in input().split()] [int(x) for x in input().split()] b a, b = [int(x) for x in input().split()] [int(x) for x in input().split()] a def gcd(a,b):
    while b != 0:
        a , b = b , a % b
    return a def gcd(a,b):
    while b != 0:
        a , b = b , a % b
    return a gcd
def gcd(a,b):
    while b != 0:
        a , b = b , a % b
    return a
def lcm(a,b):
    return int(abs(a*b) / gcd(a,b))

while True:
    try:
        a, b = [int(x) for x in input().split()]
    except:
        exit()
    print(gcd(a,b),lcm(a,b))