using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Magatro { static long A, B; static void Main() { long[] ss = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray(); Array.Sort(ss); A = ss[0]; B = ss[1]; long G = GCD(A, B); long q = A / G; long w = B / G; long gg = GCD(q + w, q) * GCD(q + w, w) * GCD(q + w, G) * G; Console.WriteLine(gg); } static long GCD(params long[]ab) { Array.Sort(ab); long b = ab[0], a = ab[1]; long r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } }