#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

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

def main():
    for line in sys.stdin:
        a, b = map(int, line.split())
        d = gcd(a, b)
        m = a * b // d
        print("{} {}".format(d, m))

if __name__ == "__main__": main() import sys sys def gcd(a, b):
    if b == 0: return a
    return gcd(b, a % b) gcd if b == 0: return a
     b == 0 b 0 return gcd(b, a % b) gcd(b, a % b) gcd b a % b a b a a b b def main():
    for line in sys.stdin:
        a, b = map(int, line.split())
        d = gcd(a, b)
        m = a * b // d
        print("{} {}".format(d, m)) main for line in sys.stdin:
        a, b = map(int, line.split())
        d = gcd(a, b)
        m = a * b // d
        print("{} {}".format(d, m)) line sys.stdin sys stdin a, b = map(int, line.split()) a map(int, line.split()) map int line.split() line.split line split b d = gcd(a, b) d gcd(a, b) gcd a b m = a * b // d m a * b // d a * b a b d print("{} {}".format(d, m)) print "{} {}".format(d, m) "{} {}".format "{} {}" format d m if __name__ == "__main__": main() __name__ == "__main__" __name__ "__main__" def gcd(a, b):
    if b == 0: return a
    return gcd(b, a % b) def gcd(a, b):
    if b == 0: return a
    return gcd(b, a % b) gcd def main():
    for line in sys.stdin:
        a, b = map(int, line.split())
        d = gcd(a, b)
        m = a * b // d
        print("{} {}".format(d, m)) def main():
    for line in sys.stdin:
        a, b = map(int, line.split())
        d = gcd(a, b)
        m = a * b // d
        print("{} {}".format(d, m)) main
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

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

def main():
    for line in sys.stdin:
        a, b = map(int, line.split())
        d = gcd(a, b)
        m = a * b // d
        print("{} {}".format(d, m))

if __name__ == "__main__": main()