var
	n, maxc, minc, i, j: longint;
	x, y: array [1..500] of longint;
	ok, ni: boolean;

function nei(xi, yi, xj, yj: longint): boolean;
begin
	nei := 
		((yi = yj) and (abs(xi - xj) = 1)) or
		((yi = yj + 1) and (xi mod 2 = 0) and (xi + yi = xj + yj)) or
		((yj = yi + 1) and (xj mod 2 = 0) and (xi + yi = xj + yj));
end;

begin
	randseed := 491497074;
	n := 500;

	minc := -1;
	maxc := 1;


	for i := 1 to n do begin
		repeat
			x[i] := minc + random(maxc - minc + 1);
			y[i] := minc + random(maxc - minc + 1);
			ok := true;
			ni := i = 1;
			for j := 1 to i - 1 do begin
				if (x[i] = x[j]) and (y[i] = y[j]) then begin
					ok := false;
					break;
				end;
				if nei(x[i], y[i], x[j], y[j]) then begin
					ni := true;
				end;
			end;
		until ok and ni;
		if (x[i] - 1 < minc) then minc := x[i] - 1;
		if (y[i] - 1 < minc) then minc := y[i] - 1;
		if (x[i] + 1 > maxc) then maxc := x[i] + 1;
		if (y[i] + 1 > maxc) then maxc := y[i] + 1;
	end;

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