import sys
import fractions

def main():

    dataset = sys.stdin.readlines()
    for data in dataset:
        a, b = map(int, data.split())
        gcd_num = fractions.gcd(a, b)
        print('%d %d' % (gcd_num, a * b / gcd_num))
        
    
main() import sys sys import fractions fractions def main():

    dataset = sys.stdin.readlines()
    for data in dataset:
        a, b = map(int, data.split())
        gcd_num = fractions.gcd(a, b)
        print('%d %d' % (gcd_num, a * b / gcd_num))
        
     main dataset = sys.stdin.readlines() dataset sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines for data in dataset:
        a, b = map(int, data.split())
        gcd_num = fractions.gcd(a, b)
        print('%d %d' % (gcd_num, a * b / gcd_num))
        
     data dataset a, b = map(int, data.split()) a map(int, data.split()) map int data.split() data.split data split b gcd_num = fractions.gcd(a, b) gcd_num fractions.gcd(a, b) fractions.gcd fractions gcd a b print('%d %d' % (gcd_num, a * b / gcd_num)) print '%d %d' % (gcd_num, a * b / gcd_num) '%d %d' (gcd_num, a * b / gcd_num) gcd_num a * b / gcd_num a * b a b gcd_num main() main def main():

    dataset = sys.stdin.readlines()
    for data in dataset:
        a, b = map(int, data.split())
        gcd_num = fractions.gcd(a, b)
        print('%d %d' % (gcd_num, a * b / gcd_num))
        
     def main():

    dataset = sys.stdin.readlines()
    for data in dataset:
        a, b = map(int, data.split())
        gcd_num = fractions.gcd(a, b)
        print('%d %d' % (gcd_num, a * b / gcd_num))
        
     main
import sys
import fractions

def main():

    dataset = sys.stdin.readlines()
    for data in dataset:
        a, b = map(int, data.split())
        gcd_num = fractions.gcd(a, b)
        print('%d %d' % (gcd_num, a * b / gcd_num))
        
    
main()