uses sysutils;

var n: integer;

procedure test (b,w: integer);
var f: text;
begin
  assign (f, format ('%.2d',[n]));
  rewrite (f);
  writeln (f, b, ' ', w);
  close (f);
  inc (n);
end;

var i,j: integer;
begin
  n := 1;
  test (12, 15);
  test (0, 0);
  for i := 0 to 3 do begin
    for j := 0 to 3 do
      if (i <> 0) and (j <> 0) then test (i, j);
    test (i, 5000);
    test (i, 10000);
    test (5000, i);
    test (10000, i);
  end;

  for i := 4801 to 4803 do
    for j := 4801 to 4803 do
      test (i, j);

  for i := 9939 to 9942 do
    for j := 9939 to 9942 do
      test (i, j);
  test (10000,10000);

  randseed := 991481;
  for i := 1 to 10 do
    test (random (10001)+1, random (10001)+1);
end.
