A, B = gets.chomp.split(" ").map{|s| s.to_i}

if A > B
  ltmp = A
  stmp = B
else
  ltmp = B
  stmp = A
end

r = ltmp % [stmp, 1].max
[A, B].max.times do
  ltmp = stmp
  stmp = r
  r = ltmp % [stmp, 1].max
  break if r <= 0
end

puts A * B / [stmp, 1].max