let input = require('fs').readFileSync('/dev/stdin').toString().trim();
const sol = (input) => {
const [a, b] = input.split(" ").map(Number);
const greatest = (a, b) => {
if (b === 0) return a;
return greatest(b, a % b);
};
const least = (a, b) => (a * b) / greatest(a, b);
return [greatest(a, b), least(a, b)];
};
const arr = sol(input);
for (let x of arr) {
console.log(x);
}