import std; T gcd(T)(T a, T b) { if (b == 0) return a; return gcd(b, a % b); } long calc(long a, long b) { long g = gcd(a, b); return g * gcd(a/g + b/g, g); } void main() { long a, b; scan(a, b); writeln(calc(a, b)); } void scan(T...)(ref T a) { string[] ss = readln.split; foreach (i, t; T) a[i] = ss[i].to!t; } T read(T)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readint = read!int; alias readints = reads!int;