A,B = gets.split.map(&:to_i) puts (A + B).gcd(A) * (A + B).gcd(B) / A.gcd(B)