require 'prime'
ans=1
a,b=gets.split.map &:to_i
aa=a.prime_division << [Float::INFINITY]
bb=b.prime_division << [Float::INFINITY]
la=aa.size
lb=bb.size
ea,eb=aa.each,bb.each
pa=ea.next
pb=eb.next
(la+lb).times do
  break if pa[0]==Float::INFINITY&&pb[0]==Float::INFINITY
  if pa[0]==pb[0]
    ans*=pa[0]**[pa[1],pb[1]].max
    pa=ea.next
    pb=eb.next
  elsif pa[0] > pb[0]
    ans*=pb[0]**pb[1]
    pb=eb.next
  else
    ans*=pa[0]**pa[1]
    pa=ea.next
  end
end
p ans
