($N,$M)=@ARGV; ($step,$s)=(int$M/$N,0); puhs @ranges, [$M-$step,$M],$M-=$step while($M and ($M > 2*$step or $M%$step==0)); print 'Last step oversized by ',$M-$step