{$APPTYPE CONSOLE}

uses
  SysUtils, Math;

var
  f: TExtFile;
  i, j, k, x, N, p: Integer;

begin
  N := StrToIntDef(ParamStr(1), 10);
  x := 0;
  AssignFile(f, 'input.txt'); Rewrite(f);
  Writeln(f, 2 * N, ' ', 1000000);
  for i := 0 to N - 1 do begin
    Writeln(f, x * 100, ' ', i * 1000); Inc(x);
  end;
  for i := N - 1 downto 0 do begin
    Writeln(f, x * 100, ' ', i * 1000); Inc(x);
  end;
  CloseFile(f);
end.
