{$APPTYPE CONSOLE}
uses
  SysUtils;

var
  f: TextFile;
  i, j, N: Integer;
begin
  AssignFile(f, 'input.txt'); Rewrite(f);
  N := StrToIntDef(ParamStr(1), 10);
  Writeln(f, N, ' ', N);
  for i := 1 to N do begin
    for j := 1 to N do 
      Write(f, N - Abs(i - N div 2 - 1) - Abs(j - N div 2 - 1), ' ');
    Writeln(f);
  end;
  CloseFile(f);
end.
