# coding: utf-8
#Problem Name: GCD and LCM
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

while True:
    try:
        a,b = map(int,raw_input().split(' '))
        s,t = a,b
        while True:
            r = s % t
            if not r:
                LCM = t
                break
            else:
                s,t = t,r
        
        print LCM, a*b/LCM
    except:
        break while True:
    try:
        a,b = map(int,raw_input().split(' '))
        s,t = a,b
        while True:
            r = s % t
            if not r:
                LCM = t
                break
            else:
                s,t = t,r
        
        print LCM, a*b/LCM
    except:
        break True try:
        a,b = map(int,raw_input().split(' '))
        s,t = a,b
        while True:
            r = s % t
            if not r:
                LCM = t
                break
            else:
                s,t = t,r
        
        print LCM, a*b/LCM
    except:
        break except:
        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 s,t = a,b s a t b while True:
            r = s % t
            if not r:
                LCM = t
                break
            else:
                s,t = t,r
        
         True r = s % t r s % t s t if not r:
                LCM = t
                break
            else:
                s,t = t,r
        
         not r r LCM = t LCM t break s,t = t,r s t t r print LCM a*b/LCM a*b a b LCM r = s % t s % t r b = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) b s,t = a,b a s LCM = t t LCM s,t = t,r t s a,b = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) a t = t,r r t t = a,b b t
# coding: utf-8
#Problem Name: GCD and LCM
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

while True:
    try:
        a,b = map(int,raw_input().split(' '))
        s,t = a,b
        while True:
            r = s % t
            if not r:
                LCM = t
                break
            else:
                s,t = t,r
        
        print LCM, a*b/LCM
    except:
        break