program gen_random;

{$APPTYPE CONSOLE}

uses SysUtils;

const
  MAXN = 100;
  MAXX = 10000;
  MAX_TRIES = 1000000;

var
  i, n, up, tries: integer;
  x, y: array [1..MAXN+1] of integer;

procedure generate_point(var xx, yy: integer);
 var
   i: integer;
   ok: boolean;
begin
  while true do begin
    xx := random(2*MAXX+1)-MAXX;
    yy := random(2*MAXX+1)-MAXX;
    ok := true;
    for i:= 1 to n do
      if (x[i]=xx) and (y[i]=yy) then begin
        ok:= false;
        break;
      end;
    if ok then break;
  end;
end;

begin
  i:=1;
  while (FileExists(IntToStr(i)+'.in')) do inc(i);
  rewrite(output,IntToStr(i)+'.in');

  randomize;

  n := 0;

  generate_point(x[1],y[1]);
  inc(n);
  generate_point(x[2],y[2]);
  inc(n);

  if ParamCount > 0 then up := StrToInt(ParamStr(1)) else up:= random(MAXN-2)+3;

  tries := 0;
  while (n < up) and (tries < MAX_TRIES) do begin
    generate_point(x[n+1],y[n+1]);
    if ( (x[n]-x[n-1])*(y[n+1]-y[n-1])-(x[n+1]-x[n-1])*(y[n]-y[n-1]) < 0 ) and
       ( (x[n+1]-x[n])*(y[1]-y[n])-(x[1]-x[n])*(y[n+1]-y[n]) < 0 ) and
       ( (x[1]-x[n+1])*(y[2]-y[n+1])-(x[2]-x[n+1])*(y[1]-y[n+1]) < 0 ) then
    begin
      tries := 0;
      inc(n);
    end else inc(tries);
  end;

  if n < 3 then begin
    writeln('3');
    writeln('1 0');
    writeln('15 5');
    writeln('-5 45');
  end else begin
    writeln(n);
    for i:=1 to n do writeln(x[i],' ',y[i]);
  end;

  sleep(100);
end.