#coding: utf-8

import sys

def gojo(a,b):
    if b % a == 0:
        return a
    else:
        return gojo(b % a, a)

for line in sys.stdin:
    l = map(int,line.split())
    l.sort()
    a = l[0]
    b = l[1]
    print gojo(a,b),a*b/gojo(a,b) import sys sys def gojo(a,b):
    if b % a == 0:
        return a
    else:
        return gojo(b % a, a) gojo if b % a == 0:
        return a
    else:
        return gojo(b % a, a) b % a == 0 b % a b a 0 return a a return gojo(b % a, a) gojo(b % a, a) gojo b % a b a a a a b b for line in sys.stdin:
    l = map(int,line.split())
    l.sort()
    a = l[0]
    b = l[1]
    print gojo(a,b),a*b/gojo(a,b) line sys.stdin sys stdin l = map(int,line.split()) l map(int,line.split()) map int line.split() line.split line split l.sort() l.sort l sort a = l[0] a l[0] l 0 b = l[1] b l[1] l 1 print gojo(a,b) gojo a b a*b/gojo(a,b) a*b a b gojo(a,b) gojo a b l = map(int,line.split()) map(int,line.split()) l b = l[1] l[1] b a = l[0] l[0] a def gojo(a,b):
    if b % a == 0:
        return a
    else:
        return gojo(b % a, a) def gojo(a,b):
    if b % a == 0:
        return a
    else:
        return gojo(b % a, a) gojo
#coding: utf-8

import sys

def gojo(a,b):
    if b % a == 0:
        return a
    else:
        return gojo(b % a, a)

for line in sys.stdin:
    l = map(int,line.split())
    l.sort()
    a = l[0]
    b = l[1]
    print gojo(a,b),a*b/gojo(a,b)