A, B = gets.split(' ')
a = A.to_i
b = B.to_i

# 素因数分解
def get_prime_factors(x)
  factors = []
  factor = 2
  while true
    if x % factor == 0
      factors << factor
      if x.div(factor) == 1
        break
      else
        x = x.div(factor) 
      end
    else
      factor += 1
    end
  end
  puts factors
  return factors
end

pf_a = get_prime_factors(a) # aの素因数
pf_b = get_prime_factors(b) # bの素因数

lcm = 1 # aとbの最小公倍数
(pf_a - pf_b + pf_b).each do |i|
  lcm *= i
end

puts lcm