k=int(input())
a,b=map(int,input().split())
ans1=[(0,0)]
ans2=[(0,0)]
for i in range(abs(b)//k):
  if b<0:
    ans1.append((0,ans1[-1][1]-k))
    ans2.append((0,ans2[-1][1]-k))
  else:
    ans1.append((0,ans1[-1][1]+k))
    ans2.append((0,ans2[-1][1]+k))
if b<0:
  ans2.append((0,ans2[-1][1]-k))
else:
  ans2.append((0,ans2[-1][1]+k))
if ans1[-1][1]!=b:
  tmp1=k-abs(b-ans1[-1][1])
  if a<0:
    tmp1*=-1
    ans1.append((tmp1,b))
  else:
    ans1.append((tmp1,b))
else:
  tmp1=0
if ans2[-1][1]!=b:
  tmp2=k-abs(b-ans2[-1][1])
  if a<0:
    tmp2*=-1
    ans2.append((tmp2,b))
  else:
    ans2.append((tmp2,b))
else:
  tmp2=0
for i in range(abs(tmp1-a)//k):
  if abs(a-ans1[-1][0])//2<=k:
    break
  if tmp1<a:
    ans1.append((ans1[-1][0]+k,b))
  else:
    ans1.append((ans1[-1][0]-k,b))
for i in range(abs(tmp2-a)//k):
  if abs(a-ans2[-1][0])//2<=k:
    break
  if tmp2<a:
    ans2.append((ans2[-1][0]+k,b))
  else:
    ans2.append((ans2[-1][0]-k,b))
if abs(a-ans1[-1][0])%2!=0 and abs(a-ans2[-1][0])%2!=0:
  print(-1)
elif abs(a-ans1[-1][0])%2!=0 and abs(a-ans2[-1][0])%2==0:
  diff2=abs(a-ans2[-1][0])//2
  if diff2*2!=k:
    if tmp2<a:
      ans2.append((ans2[-1][0]+diff2,b+(k-diff2)))
      ans2.append((a,b))
    else:
      ans2.append((ans[-1][0]-diff2,b+(k-diff2)))
      ans2.append((a,b))
  else:
    ans2.append((a,b))
  print(len(ans2)-1)
  for i in range(1,len(ans2)):
    print(ans2[i][0],ans2[i][1])
elif abs(a-ans1[-1][0])%2==0 and abs(a-ans2[-1][0])%2!=0:
  diff1=abs(a-ans1[-1][0])//2
  if diff1*2!=k:
    if tmp1<a:
      ans1.append((ans1[-1][0]+diff1,b+(k-diff1)))
      ans1.append((a,b))
    else:
      ans1.append((ans1[-1][0]-diff1,b+(k-diff1)))
      ans1.append((a,b))
  else:
    ans1.append((a,b))
  print(len(ans1)-1)
  for i in range(1,len(ans1)):
    print(ans1[i][0],ans1[i][1])
else:
  diff1=abs(a-ans1[-1][0])//2
  if diff1*2!=k:
    if tmp1<a:
      ans1.append((ans1[-1][0]+diff1,b+(k-diff1)))
      ans1.append((a,b))
    else:
      ans1.append((ans1[-1][0]-diff1,b+(k-diff1)))
      ans1.append((a,b))
  else:
    ans1.append((a,b))
  diff2=abs(a-ans2[-1][0])//2
  if diff2*2!=k:
    if tmp2<a:
      ans2.append((ans2[-1][0]+diff2,b+(k-diff2)))
      ans2.append((a,b))
    else:
      ans2.append((ans[-1][0]-diff2,b+(k-diff2)))
      ans2.append((a,b))
  else:
    ans2.append((a,b))
  if len(ans1)<=len(ans2):
    print(len(ans1)-1)
    for i in range(1,len(ans1)):
      print(ans1[i][0],ans1[i][1])
  else:
    print(len(ans2)-1)
    for i in range(1,len(ans2)):
      print(ans2[i][0],ans2[i][1])

### FIXED CODE ###

def editarr(x,y,arr):
  if abs(x)>=abs(y):
    for i in range(len(arr)):
      arr[i][0],arr[i][1]=arr[i][1],arr[i][0]
  if x<0:
    for i in range(len(arr)):
      arr[i][0]*=-1
  if y<0:
    for i in range(len(arr)):
      arr[i][1]*=-1

k=int(input())
x,y=map(int,input().split())
ans=[]
tx=abs(x)
ty=abs(y)
if tx>=ty:
  tx,ty=ty,tx
if k%2==0 and (tx+ty)%2!=0:
  print(-1)
else:
  if tx+ty<k:
    if (tx+ty)%2==0:
      m=(ty-tx)//2
      ans.append([k-m,m])
    else:
      td=k-(tx+ty)
      ans.append([tx,ty+td])
      ans.append([tx+(k-td//2),ty+td//2])
    ans.append([tx,ty])
    n=len(ans)
  elif ty-(k-tx%k)<k and (ty-(k-tx%k))%2!=0:
    if tx<k and ty<k:
      if (2*k-(tx+ty))%2==0:
        td=2*k-(tx+ty)
        ans.append([tx+td//2,k-(tx+td//2)])
        ans.append([tx,ty])
      else:
        ans.append([tx,k-tx])
        td=ty-(k-tx)
        ans.append([tx+(k-td//2),ans[-1][1]+td//2])
        ans.append([tx,ty])
      n=len(ans)
    else:
      if tx+ty<2*k:
        if (2*k-(tx+ty))%2==0:
          td=2*k-(tx+ty)
          ans.append([tx+td//2,k-(tx+td//2)])
          ans.append([tx,ty])
        else:
          ans.append([tx,k-tx])
          td=ty-(k-tx)
          ans.append([tx+(k-td//2),ans[-1][1]+td//2])
          ans.append([tx,ty])
        n=len(ans)
      else:
        ans.append([0,0])  
  else:
    ans.append([0,0])
    for i in range(tx//k):
      ans.append([ans[-1][0]+k,0])
    if ans[-1][0]!=tx:
      ans.append([tx,k-abs(tx-ans[-1][0])])
    td=ty-ans[-1][1]
    if td%k==0:
      flag=True
    else:
      flag=False
    for i in range(td//k):
      if flag==False and (ty-ans[-1][1])%2==0 and (ty-ans[-1][1])<=2*k:
          break
      ans.append([tx,ans[-1][1]+k])
    if ans[-1][1]!=ty:
      td=ty-ans[-1][1]
      ans.append([tx+(k-td//2),ans[-1][1]+td//2])
      ans.append([tx,ty])
    ans.pop(0)
    n=len(ans)
  editarr(x,y,ans)
  print(n)
  for a,b in ans:
    print(a,b)