{$APPTYPE CONSOLE}

uses
  SysUtils, Math;

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

begin
  N := StrToIntDef(ParamStr(1), 10);
  k := StrToIntDef(ParamStr(2), 3);
  p := StrToIntDef(ParamStr(3), 1);
  x := 0;
  AssignFile(f, 'input.txt'); Rewrite(f);
  Writeln(f, (N - 1) * (k + 1) + 2 * k + 1 + 1, ' ', 2 * k + 2);
  for i := 0 to N - 1 do begin
    Writeln(f, x, ' ', 0); Inc(x);
    for j := 1 to IfThen(i = p, 2 * k, k) do begin
      Writeln(f, x, ' ', 100);
      Inc(x);
    end;
  end;
  Writeln(f, x, ' ', 0);
  CloseFile(f);
end.
