{$apptype console}

var i, j, d, k, l: longint;

begin
  reset(input, 'dkl.in');
  rewrite(output, 'dkl.out');

  read(d, k, l);
  if (d < l) or (l < k) then begin
    writeln('0 0');
    halt(0);
  end;

  writeln(2 * (d + 1), ' ', (d + 1) * d + l);
  for i := 1 to d + 1 do
    for j := i + 1 to d + 1 do begin
      writeln(i, ' ', j);
      writeln(i + (d + 1), ' ', j + (d + 1));
    end;
  for i := 1 to l do
    writeln(i, ' ', (d + 1) + (i mod k) + 1);
end.