def GCD(x, y):
    if(x == 0):
        return(y)
    return(GCD(y % x, x))

def LCM(x, y):
    return(x * y / GCD(x, y))

while(True):
    try:
        a = map(int, raw_input().split())
        if(a[0] > a[1]):
            a[0], a[1] = a[1], a[0]
        print(GCD(a[0], a[1])),
        print(LCM(a[0], a[1]))
    except Exception:
        break def GCD(x, y):
    if(x == 0):
        return(y)
    return(GCD(y % x, x)) GCD if(x == 0):
        return(y)
     x == 0 x 0 return(y) y return(GCD(y % x, x)) GCD(y % x, x) GCD y % x y x x 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:
        a = map(int, raw_input().split())
        if(a[0] > a[1]):
            a[0], a[1] = a[1], a[0]
        print(GCD(a[0], a[1])),
        print(LCM(a[0], a[1]))
    except Exception:
        break True try:
        a = map(int, raw_input().split())
        if(a[0] > a[1]):
            a[0], a[1] = a[1], a[0]
        print(GCD(a[0], a[1])),
        print(LCM(a[0], a[1]))
    except Exception:
        break except Exception:
        break break a = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split if(a[0] > a[1]):
            a[0], a[1] = a[1], a[0]
         a[0] > a[1] a[0] a 0 a[1] a 1 a[0], a[1] = a[1], a[0] a[0] a 0 a[1] a 1 a[1] a 1 a[0] a 0 print(GCD(a[0], a[1])) print GCD(a[0], a[1]) GCD a[0] a 0 a[1] a 1 print(LCM(a[0], a[1])) print LCM(a[0], a[1]) LCM a[0] a 0 a[1] a 1 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):
    if(x == 0):
        return(y)
    return(GCD(y % x, x)) def GCD(x, y):
    if(x == 0):
        return(y)
    return(GCD(y % x, x)) GCD a = map(int, raw_input().split()) map(int, raw_input().split()) a
def GCD(x, y):
    if(x == 0):
        return(y)
    return(GCD(y % x, x))

def LCM(x, y):
    return(x * y / GCD(x, y))

while(True):
    try:
        a = map(int, raw_input().split())
        if(a[0] > a[1]):
            a[0], a[1] = a[1], a[0]
        print(GCD(a[0], a[1])),
        print(LCM(a[0], a[1]))
    except Exception:
        break