{$apptype console}

uses
  Classes, SysUtils;
var
  i, N: Integer;
  sl: TStringList;
  x, y: integer;
  s: string;
begin
  N := StrToIntDef(ParamStr(1), 1);
  RandSeed := StrToIntDef(ParamStr(2), 1);
  Writeln(N);
  sl := TStringList.Create;
  sl.Sorted := true;
  for i := 1 to N do begin
    s := '';
    repeat
      x := Random(1000);
      y := Random(1000);
      s := Format('%d.%d', [x, y]);
    until sl.IndexOf(s) = -1;
    sl.Add(s);
    Writeln(x, ' ', y);
  end;
end.
