x,y,l=$<.map &:to_i p (x.abs+y.abs)/-l*-1+(y<0?2:x==0?0:1)