using System;
using System.Collections.Generic;
using System.Linq;
public class Program {
public static void Main() {
string[] inputs = Console.ReadLine().Split(' ');
long a = long.Parse(inputs[0]);
long b = long.Parse(inputs[1]);
Console.Write(Gcd(a, b) + " ");
Console.Write(Lcm(a, b));
}
public static long Gcd(long a, long b) {
return b == 0 ? a : Gcd(b, a % b);
}
public static long Lcm(long a, long b) {
return a * b / Gcd(a, b);
}
}

京公网安备 11010502036488号