#!ruby -narprime l,h=$F.map &:to_i a=*Prime.each(h**0.5) loop{x=a.pop;(h/x*x).step(l,-x){|t|a.all?{|q|t%q>0}&&(p t;exit)}}