import sys


def calc_gcd(x, y):
    """ ?????§??¬?´???°????¨?????????? """
    if y == 0:
        return x
    else:
        return int(calc_gcd(y, x % y))


def calc_lcm(x, y):
    """ ????°???¬?????°????¨?????????? """
    return int((x * y) / calc_gcd(x, y))


if __name__ == '__main__':
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        x, y = map(int, line.split(' '))
        print('{0} {1}'.format(calc_gcd(x, y), calc_lcm(x, y))) import sys sys def calc_gcd(x, y):
    """ ?????§??¬?´???°????¨?????????? """
    if y == 0:
        return x
    else:
        return int(calc_gcd(y, x % y)) calc_gcd """ ?????§??¬?´???°????¨?????????? """ if y == 0:
        return x
    else:
        return int(calc_gcd(y, x % y)) y == 0 y 0 return x x return int(calc_gcd(y, x % y)) int(calc_gcd(y, x % y)) int calc_gcd(y, x % y) calc_gcd y x % y x y x x y y def calc_lcm(x, y):
    """ ????°???¬?????°????¨?????????? """
    return int((x * y) / calc_gcd(x, y)) calc_lcm """ ????°???¬?????°????¨?????????? """ return int((x * y) / calc_gcd(x, y)) int((x * y) / calc_gcd(x, y)) int (x * y) / calc_gcd(x, y) x * y x y calc_gcd(x, y) calc_gcd x y x x y y if __name__ == '__main__':
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        x, y = map(int, line.split(' '))
        print('{0} {1}'.format(calc_gcd(x, y), calc_lcm(x, y))) __name__ == '__main__' __name__ '__main__' for line in sys.stdin:
        x, y = map(int, line.split(' '))
        print('{0} {1}'.format(calc_gcd(x, y), calc_lcm(x, y))) line sys.stdin sys stdin x, y = map(int, line.split(' ')) x map(int, line.split(' ')) map int line.split(' ') line.split line split ' ' y print('{0} {1}'.format(calc_gcd(x, y), calc_lcm(x, y))) print '{0} {1}'.format(calc_gcd(x, y), calc_lcm(x, y)) '{0} {1}'.format '{0} {1}' format calc_gcd(x, y) calc_gcd x y calc_lcm(x, y) calc_lcm x y def calc_lcm(x, y):
    """ ????°???¬?????°????¨?????????? """
    return int((x * y) / calc_gcd(x, y)) def calc_lcm(x, y):
    """ ????°???¬?????°????¨?????????? """
    return int((x * y) / calc_gcd(x, y)) calc_lcm y = map(int, line.split(' ')) map(int, line.split(' ')) y x, y = map(int, line.split(' ')) map(int, line.split(' ')) x def calc_gcd(x, y):
    """ ?????§??¬?´???°????¨?????????? """
    if y == 0:
        return x
    else:
        return int(calc_gcd(y, x % y)) def calc_gcd(x, y):
    """ ?????§??¬?´???°????¨?????????? """
    if y == 0:
        return x
    else:
        return int(calc_gcd(y, x % y)) calc_gcd
import sys


def calc_gcd(x, y):
    """ ?????§??¬?´???°????¨?????????? """
    if y == 0:
        return x
    else:
        return int(calc_gcd(y, x % y))


def calc_lcm(x, y):
    """ ????°???¬?????°????¨?????????? """
    return int((x * y) / calc_gcd(x, y))


if __name__ == '__main__':
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        x, y = map(int, line.split(' '))
        print('{0} {1}'.format(calc_gcd(x, y), calc_lcm(x, y)))