uses
    Math;

const
	maxn = 1000;

var
	x, y, d: array [1..maxn] of longint;
	ang: array [1..maxn] of extended;
	i, j, k, n, minc, maxc: longint;
	ok: boolean;
	retries: longint;

procedure sort(l, r: longint);
var
	x, t: extended;
	i, j: longint;
begin
	i := l;
	j := r;
	x := ang[l + random(r - l + 1)];
	while i <= j do begin
		while ang[i] < x do inc(i);
		while ang[j] > x do dec(j);
		if i <= j then begin
		    t := ang[i]; ang[i] := ang[j]; ang[j] := t;
		    inc(i);
		    dec(j);
		end;
	end;

	if i < r then sort(i, r);
	if l < j then sort(l, j);
end;

begin
	randseed := 923471218;
	n := 1000;
	maxc := 10000;
	minc := -10000;

	retries := 0;
	repeat
		inc(retries);
    	writeln(erroutput, 'generating, attempt ', retries);
    	for i := 1 to n do begin
    		repeat
        		x[i] := random(maxc - minc + 1) + minc;
        		y[i] := random(maxc - minc + 1) + minc;

        		ok := true;
        		for j := 1 to i - 1 do begin
        			if (x[i] = x[j]) and (y[i] = y[j]) then begin
        				ok := false;
        				break;
        			end;
        			ang[j] := arctan2(y[j] - y[i], x[j] - x[i]);
        			if ang[j] < 0 then
        				ang[j] := ang[j] + PI;
        		end;
        		if ok then begin
            		sort(1, i - 1);
            		for j := 1 to i - 2 do begin
            			if abs(ang[j] - ang[j + 1]) < 1e-7 then begin
            				ok := false;
            				break;
            			end;
            		end;
            	end;	
        	until ok;
    		d[i] := 1;
    	end;

    	for i := 1 to n - 2 do begin
    		j := random(n) + 1;
    		inc(d[j]);
    	end;

    	ok := true;
    	for i := 1 to n do begin
    		k := 0;
    		for j := 1 to n do begin
    			if i = j then continue;
    			inc(k);
    			ang[k] := arctan2(y[j] - y[i], x[j] - x[i]);
    			if ang[k] < 0 then
    				ang[k] := ang[k] + 2 * PI;
    		end;

    		sort(1, k);
    		for j := 1 to n - 2 do begin
    			if abs(ang[j] - ang[j + 1]) < 1e-9 then begin
    				writeln(i, ' ', ang[j], ' ', ang[j + 1]);
    				ok := false;
    				exit;
    			end;
    		end;

    		if not ok then break;
    	end;
    until ok;

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