uses SysUtils;

var
  n,m,k,i,j: Integer;
  a,b: array[1..10000] of Integer;
  pc: Integer;
begin
  n := StrToInt(ParamStr(1));
  m := StrToInt(ParamStr(2));
  pc := StrToInt(ParamStr(3));

  randomize;
  k:=0;
  for i:=1 to n do for j:=1 to m do
    if random(100) < pc then
    begin
      inc(k);
      a[k]:=i; b[k]:=j;
    end;
  writeln(n,' ',m,' ',k);
  for i:=1 to k do
      writeln(a[i],' ',b[i]);
end.
