# -*- coding: utf-8 -*-
import math
errerN=1

while errerN:
    try:
        a=list(map(int, input().split()))
        gcdN=math.gcd(a[0],a[1])
        print(gcdN, int(a[0]*a[1]/gcdN))
    except :
        errerN=0 import math math errerN=1 errerN 1 while errerN:
    try:
        a=list(map(int, input().split()))
        gcdN=math.gcd(a[0],a[1])
        print(gcdN, int(a[0]*a[1]/gcdN))
    except :
        errerN=0 errerN try:
        a=list(map(int, input().split()))
        gcdN=math.gcd(a[0],a[1])
        print(gcdN, int(a[0]*a[1]/gcdN))
    except :
        errerN=0 except :
        errerN=0 errerN=0 errerN 0 a=list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split gcdN=math.gcd(a[0],a[1]) gcdN math.gcd(a[0],a[1]) math.gcd math gcd a[0] a 0 a[1] a 1 print(gcdN, int(a[0]*a[1]/gcdN)) print gcdN int(a[0]*a[1]/gcdN) int a[0]*a[1]/gcdN a[0]*a[1] a[0] a 0 a[1] a 1 gcdN errerN=1 1 errerN a=list(map(int, input().split())) list(map(int, input().split())) a gcdN=math.gcd(a[0],a[1]) math.gcd(a[0],a[1]) gcdN errerN=0 0 errerN
# -*- coding: utf-8 -*-
import math
errerN=1

while errerN:
    try:
        a=list(map(int, input().split()))
        gcdN=math.gcd(a[0],a[1])
        print(gcdN, int(a[0]*a[1]/gcdN))
    except :
        errerN=0
