#coding:UTF-8

def gcd(x,y):
    r = x % y

    if r==0: return y
    else: return gcd(y,r)

def lcm(x,y):
    return x * y / gcd(x,y)

while True:
    try:
        n = map(int, raw_input().split())

        print "%d %d"%(gcd(n[0],n[1]),lcm(n[0],n[1]))

    except Exception:
        break; def gcd(x,y):
    r = x % y

    if r==0: return y
    else: return gcd(y,r) gcd r = x % y r x % y x y if r==0: return y
    else: return gcd(y,r) r==0 r 0 x x y y def lcm(x,y):
    return x * y / gcd(x,y) lcm return x * y / gcd(x,y) x * y / gcd(x,y) x * y x y gcd(x,y) gcd x y x x y y while True:
    try:
        n = map(int, raw_input().split())

        print "%d %d"%(gcd(n[0],n[1]),lcm(n[0],n[1]))

    except Exception:
        break; True try:
        n = map(int, raw_input().split())

        print "%d %d"%(gcd(n[0],n[1]),lcm(n[0],n[1]))

    except Exception:
        break; except Exception:
        break; break n = map(int, raw_input().split()) n map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split print "%d %d"%(gcd(n[0],n[1]),lcm(n[0],n[1])) "%d %d" (gcd(n[0],n[1]),lcm(n[0],n[1])) gcd(n[0],n[1]) gcd n[0] n 0 n[1] n 1 lcm(n[0],n[1]) lcm n[0] n 0 n[1] n 1 n = map(int, raw_input().split()) map(int, raw_input().split()) n def lcm(x,y):
    return x * y / gcd(x,y) def lcm(x,y):
    return x * y / gcd(x,y) lcm def gcd(x,y):
    r = x % y

    if r==0: return y
    else: return gcd(y,r) def gcd(x,y):
    r = x % y

    if r==0: return y
    else: return gcd(y,r) gcd
#coding:UTF-8

def gcd(x,y):
    r = x % y

    if r==0: return y
    else: return gcd(y,r)

def lcm(x,y):
    return x * y / gcd(x,y)

while True:
    try:
        n = map(int, raw_input().split())

        print "%d %d"%(gcd(n[0],n[1]),lcm(n[0],n[1]))

    except Exception:
        break;