#t17. 计算两数的最大公约数与最小公倍数

计算两数的最大公约数与最小公倍数

GCD and LCM of Two Numbers

Problem Description

Given two positive integers, compute their greatest common divisor and least common multiple.

Input Format

The input gives two positive integers M and N (≤1000\le 1000) on one line.

Output Format

Output the greatest common divisor and the least common multiple of M and N on one line, separated by a single space.

Sample Input

511 292

Sample Output

73 2044

Constraints

1≤M,N≤10001 \le M, N \le 1000