import sys

for i in sys.stdin:
    a,b=list(map(int, i.split()))
    d=a*b
    if a>b:
        temp=a
        a=b
        b=temp
    c=a%b
    while c!=0:
        a=b
        b=c
        c=a%b
    g=b
    l=int(d/g)
    print("{} {}".format(g,l)) import sys sys for i in sys.stdin:
    a,b=list(map(int, i.split()))
    d=a*b
    if a>b:
        temp=a
        a=b
        b=temp
    c=a%b
    while c!=0:
        a=b
        b=c
        c=a%b
    g=b
    l=int(d/g)
    print("{} {}".format(g,l)) i sys.stdin sys stdin a,b=list(map(int, i.split())) a list(map(int, i.split())) list map(int, i.split()) map int i.split() i.split i split b d=a*b d a*b a b if a>b:
        temp=a
        a=b
        b=temp
     a>b a b temp=a temp a a=b a b b=temp b temp c=a%b c a%b a b while c!=0:
        a=b
        b=c
        c=a%b
     c!=0 c 0 a=b a b b=c b c c=a%b c a%b a b g=b g b l=int(d/g) l int(d/g) int d/g d g print("{} {}".format(g,l)) print "{} {}".format(g,l) "{} {}".format "{} {}" format g l d=a*b a*b d b=list(map(int, i.split())) list(map(int, i.split())) b l=int(d/g) int(d/g) l a=b b a temp=a a temp b=c c b g=b b g c=a%b a%b c c=a%b a%b c a=b b a a,b=list(map(int, i.split())) list(map(int, i.split())) a b=temp temp b
import sys

for i in sys.stdin:
    a,b=list(map(int, i.split()))
    d=a*b
    if a>b:
        temp=a
        a=b
        b=temp
    c=a%b
    while c!=0:
        a=b
        b=c
        c=a%b
    g=b
    l=int(d/g)
    print("{} {}".format(g,l))