Language: C

#define X (x-P>0?x-P:P-x)
#define Y (y-Q>0?y-Q:Q-y)
#define N (P<x?1:-1)
#define M (Q<y?1:-1)
#define p(x,y) (A[++S]=x,B[S]=y) 
t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}

Compiler output:
main.c:6:1: warning: data definition has no type or storage class
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      | ^
main.c:6:1: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
main.c:6:3: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |   ^
main.c:6:5: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |     ^
main.c:6:7: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |       ^
main.c:6:9: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |         ^
main.c:6:11: error: type defaults to 'int' in declaration of 'Q' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |           ^
main.c:6:13: error: type defaults to 'int' in declaration of 'S' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |             ^
main.c:6:15: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |               ^
main.c:6:19: error: type defaults to 'int' in declaration of 'A' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                   ^
main.c:6:28: error: type defaults to 'int' in declaration of 'B' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                            ^
main.c:6:37: error: return type defaults to 'int' [-Wimplicit-int]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                     ^~~~
main.c: In function 'main':
main.c:6:44: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #define X (x-P>0?x-P:P-x)
main.c:6:44: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                            ^~~~~
main.c:6:44: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:87: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                                                                       ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | #define X (x-P>0?x-P:P-x)
main.c:6:87: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                                                                       ^~~~
main.c:6:87: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:6:92: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                                                                            ^~~~
main.c:6:92: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:6:237: error: called object is not a function or function pointer
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                                                                                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:6:291: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 | t,k,x,y,P,Q,S,i=1,A[1<<20],B[1<<20];main(){scanf("%d%d%d",&k,&x,&y);!(k&1)&&(x+y&1)&&(exit(puts("-1")&0),0);while(X+Y>k*2)X>k?(P+=k*N):(Q+=k*M),p(P,Q);X+Y!=k&&((k%2&&(X+Y)%2)&&(Y<=k?(P+=(k-Y)*N,Q=y):(Q+=(k-X)*M,P=x),p(P,Q)),t=k*2-X-Y>>1,X<Y?p(x+t*N,Q+(k-X-t)*M):p(P+(k-Y-t)*N,y+t*M))p(x,y),printf("%d\n",S);for(;i<=S;)printf("%d %d\n",A[i++],B[i]);}
      |                                                                                                                                                                                                                                                                                                   ^~~~~~
main.c:6:291: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:291: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:291: note: include '<stdio.h>' or provide a declaration of 'printf'