eval'K,X,Y='+`dd`.split*?,;x,y,*s=X.abs,Y.abs;d=x+y;x,y=y,x if f=x>y;K%2-d%2<0&&(p -1;exit);n=(d-1)/K+1;n+=d<K ? 1 :(d-n*K)%2;a=n<2 ?x:(d-n*K)/2;b=K-a.abs;d%2-d/K>0&&(s=[[0,-K]];a=b=(d-K)/2);n.times{s<<[a,b];t=[x-a,K].min;a+=t;b+=K-t};p s.size;s.each{|a,b|f&&(a,b=b,a);puts [a*(X<=>0.1),b*(Y<=>0.1)]*?\s}