
while True:
    try:
        x = map(int, raw_input().split(' '))
        
        if x[0] < x[1]:
            m = x[1]
            n = x[0]
        else:
            m = x[0]
            n = x[1]
           
           
        # m is greatrer than n
        while n !=0:
            m,n = n,m % n
        
        print m,x[0]*x[1]/m
    except EOFError:
        break while True:
    try:
        x = map(int, raw_input().split(' '))
        
        if x[0] < x[1]:
            m = x[1]
            n = x[0]
        else:
            m = x[0]
            n = x[1]
           
           
        # m is greatrer than n
        while n !=0:
            m,n = n,m % n
        
        print m,x[0]*x[1]/m
    except EOFError:
        break True try:
        x = map(int, raw_input().split(' '))
        
        if x[0] < x[1]:
            m = x[1]
            n = x[0]
        else:
            m = x[0]
            n = x[1]
           
           
        # m is greatrer than n
        while n !=0:
            m,n = n,m % n
        
        print m,x[0]*x[1]/m
    except EOFError:
        break except EOFError:
        break break x = map(int, raw_input().split(' ')) x map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' if x[0] < x[1]:
            m = x[1]
            n = x[0]
        else:
            m = x[0]
            n = x[1]
           
           
        # m is greatrer than n
         x[0] < x[1] x[0] x 0 x[1] x 1 m = x[1] m x[1] x 1 n = x[0] n x[0] x 0 m = x[0] m x[0] x 0 n = x[1] n x[1] x 1 while n !=0:
            m,n = n,m % n
        
         n !=0 n 0 m,n = n,m % n m n n m % n m n print m x[0]*x[1]/m x[0]*x[1] x[0] x 0 x[1] x 1 m n = x[1] x[1] n n = n,m % n m % n n x = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) x m = x[0] x[0] m m,n = n,m % n n m m = x[1] x[1] m n = x[0] x[0] n

while True:
    try:
        x = map(int, raw_input().split(' '))
        
        if x[0] < x[1]:
            m = x[1]
            n = x[0]
        else:
            m = x[0]
            n = x[1]
           
           
        # m is greatrer than n
        while n !=0:
            m,n = n,m % n
        
        print m,x[0]*x[1]/m
    except EOFError:
        break