using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Magatro { static void Main() { string[] q = Console.ReadLine().Split(' '); Array.Sort(q); long A = long.Parse(q[0]); long B = long.Parse(q[1]); long GG = G(B, A); long aa = A / GG; long bb = B / GG; Console.WriteLine(G(aa + bb, aa * bb)*GG); } static long G(long a,long b) { long r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } }