program p_j;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  fin,fout:text;
  q,n,k,a,b:integer;
  mat:array [1..1000] of integer;
  tur:array [1..1000] of record
    n:integer;
    a:integer;
    t:boolean;
    end;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  AssignFile(fin,'joke.in');
  AssignFile(fout,'joke.out');
  Reset(fin);
  Rewrite(fout);
  Readln(fin,n);
  For k:=1 to n do
    mat[k]:=0;
  For k:=1 to n do
    begin
      Readln(fin,a,b);
      inc(mat[a+b+1]);
      tur[k].n:=a+b+1;
      tur[k].a:=a;
    end;
  q:=1;
  For k:=1 to n do
    begin
      if mat[q]<mat[k] then q:=k;
    end;
  Writeln(fout,n-q+1,' ');
  For k:=1 to n do
    if ((tur[k].n<>q)or(tur[k].a>k+1))then Write(fout,k,' ');
  CloseFile(fin);
  CloseFile(fout);
end.
