import sys

for s in sys.stdin:
    a = list(map(int, s.split()))
    b = a[0]
    c = a[1]

    while c != 0:
        b, c = c, b%c

    d = a[0] * a[1] / b
    print(int(b), int(d)) import sys sys for s in sys.stdin:
    a = list(map(int, s.split()))
    b = a[0]
    c = a[1]

    while c != 0:
        b, c = c, b%c

    d = a[0] * a[1] / b
    print(int(b), int(d)) s sys.stdin sys stdin a = list(map(int, s.split())) a list(map(int, s.split())) list map(int, s.split()) map int s.split() s.split s split b = a[0] b a[0] a 0 c = a[1] c a[1] a 1 while c != 0:
        b, c = c, b%c

     c != 0 c 0 b, c = c, b%c b c c b%c b c d = a[0] * a[1] / b d a[0] * a[1] / b a[0] * a[1] a[0] a 0 a[1] a 1 b print(int(b), int(d)) print int(b) int b int(d) int d a = list(map(int, s.split())) list(map(int, s.split())) a c = a[1] a[1] c b, c = c, b%c c b d = a[0] * a[1] / b a[0] * a[1] / b d c = c, b%c b%c c b = a[0] a[0] b
import sys

for s in sys.stdin:
    a = list(map(int, s.split()))
    b = a[0]
    c = a[1]

    while c != 0:
        b, c = c, b%c

    d = a[0] * a[1] / b
    print(int(b), int(d))