#coding: utf-8
def GCM(m, n):
    while 1:
        if n == 0: return m
        m -= (m/n)*n
        m,n = n,m
    
while 1:
    try:
        a,b = map(int, raw_input().split())
        x = GCM(a,b)
        y = a*b / x
        print "%d %d" % (x, y)
    except EOFError:
        break def GCM(m, n):
    while 1:
        if n == 0: return m
        m -= (m/n)*n
        m,n = n,m
     GCM while 1:
        if n == 0: return m
        m -= (m/n)*n
        m,n = n,m
     1 if n == 0: return m
         n == 0 n 0 m -= (m/n)*n m (m/n)*n m/n m n n m,n = n,m m n n m m m n n while 1:
    try:
        a,b = map(int, raw_input().split())
        x = GCM(a,b)
        y = a*b / x
        print "%d %d" % (x, y)
    except EOFError:
        break 1 try:
        a,b = map(int, raw_input().split())
        x = GCM(a,b)
        y = a*b / x
        print "%d %d" % (x, y)
    except EOFError:
        break except EOFError:
        break break a,b = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b x = GCM(a,b) x GCM(a,b) GCM a b y = a*b / x y a*b / x a*b a b x print "%d %d" % (x, y) "%d %d" (x, y) x y y = a*b / x a*b / x y b = map(int, raw_input().split()) map(int, raw_input().split()) b def GCM(m, n):
    while 1:
        if n == 0: return m
        m -= (m/n)*n
        m,n = n,m
     def GCM(m, n):
    while 1:
        if n == 0: return m
        m -= (m/n)*n
        m,n = n,m
     GCM a,b = map(int, raw_input().split()) map(int, raw_input().split()) a x = GCM(a,b) GCM(a,b) x
#coding: utf-8
def GCM(m, n):
    while 1:
        if n == 0: return m
        m -= (m/n)*n
        m,n = n,m
    
while 1:
    try:
        a,b = map(int, raw_input().split())
        x = GCM(a,b)
        y = a*b / x
        print "%d %d" % (x, y)
    except EOFError:
        break