uses
	math;

const
	maxn = 100;

var
	n, maxc, delta, li, ri, i, ny, t, s: longint;
	xr, xl, yl, yr, x, y: array [1..maxn] of longint;
	retries: longint;

label
	retry;

begin
	randseed := 552047204;

	n := 100;
	maxc := 10;
	delta := 100;

	retry:
	repeat
		li := 1;
    	yl[li] := 0;
    	xl[li] := 1000 * random(maxc);
    	ri := 1;
    	yr[ri] := 0;
    	xr[ri] := 1000 * random(maxc);
    until xl[li] < xr[ri];

    i := 0;
    while (li + ri < n - 2) do begin
    	inc(i);
    	ny := max(yl[li], yr[ri]) + 20;
    	t := 0;
    	writeln(erroutput, xl[li], ' ', xr[ri]);

		if (t = 0) and (li + ri < n - 4) then begin	
			inc(li);
			xl[li] := xl[li - 1];
			yl[li] := ny;
			inc(li);
			inc(ri);
			xr[ri] := xr[ri - 1];
			yr[ri] := ny;
			inc(ri);
			retries := 0;
			repeat
             	xl[li] := 1000 * random(maxc);
             	xr[ri] := 1000 * random(maxc);
             	inc(retries);
            until (xl[li] < xr[ri]) and (max(xl[li], xl[li - 1]) < min(xr[ri], xr[ri - 1])) and 
            	(xl[li] <> xl[li - 1]) and (xr[ri] <> xr[ri - 1]) or (retries > 100);
            if (retries > 100) then goto retry;
			yl[li] := ny;
			yr[ri] := ny;
    	end else if (t = 1) then begin
			inc(li);
			xl[li] := xl[li - 1];
			yl[li] := ny;
			inc(li);
			retries := 0;
			repeat
             	xl[li] := 1000 * random(maxc);
             	inc(retries);
            until (xl[li] < xr[ri]) and (xl[li] <> xl[li - 1]) or (retries > 100);
            if (retries > 100) then goto retry;
			yl[li] := ny;
    	end else begin
			inc(ri);
			xr[ri] := xr[ri - 1];
			yr[ri] := ny;
			inc(ri);
			retries := 0;
			repeat
             	xr[ri] := 1000 * random(maxc);
             	inc(retries);
            until (xl[li] < xr[ri]) and (xr[ri] <> xr[ri - 1]) or (retries > 100);
            if (retries > 100) then goto retry;

			yr[ri] := ny;
    	end;
    end;

   	ny := max(yl[li], yr[ri]) + 20;
  	inc(li);
  	xl[li] := xl[li - 1];
  	yl[li] := ny;
  	inc(ri);
  	xr[ri] := xr[ri - 1];
  	yr[ri] := ny;

  	for i := 1 to ri do begin
  		x[i] := xr[i];
  		y[i] := yr[i];
  	end;
  	for i := li downto 1 do begin
  		x[ri + 1 + (li - i)] := xl[i];
  		y[ri + 1 + (li - i)] := yl[i];
  	end;

  	s := random(n) + 1;
  	writeln(n);
  	for i := s + 1 to n do begin
  		writeln(x[i], ' ', y[i]);
  	end;
  	for i := 1 to s do begin
  		writeln(x[i], ' ', y[i]);
  	end;
end.