{
TASK:sym
LANG:PASCAL
}
  {$I-,Q-,R-,S-}
type
   TLine = record
      a,b,c : double;
   end;
   TType = record
      x,y : longint;
      i : longint;
   end;
   TType2 = record
      x,y : double;
   end;
   Theap = object
      a : array[1..1024*16] of TType;
      n,i,j : longint;
      function cmp(ii,jj : longint) : boolean;
      procedure Push(var k : TType);
      procedure Pop(var k : TType);
      procedure swap(ii,jj : longint);

   end;
      function THeap.cmp(ii,jj : longint) : boolean;
      begin
         if a[ii].x<a[jj].x then cmp:=true
            else
               begin
                  if a[ii].x>a[jj].x then cmp:=false
                     else cmp:=a[ii].y<a[jj].y;
               end;
      end;
      procedure Theap.Push(var k : TType);
      begin
         inc(n);
         a[n]:=k;
         i:=n;
         while (i>1)and(cmp(i,i shr 1)) do//(a[i].w<a[i shr 1].w) do
           begin
              swap(i,i shr 1);
              i:=i shr 1;
           end;
      end;
      procedure Theap.Pop(var k : TType);
      begin
         k:=a[1];
         a[1]:=a[n];
         dec(n);
         i:=1;
         j:= i shl 1;
         while j<=n do
            begin
               if cmp(j+1,j) then inc(j);
               if cmp(j,i) then
                  begin
                     swap(i,j);
                     i:=j;
                     j:=i shl 1;
                  end
               else
                  exit;
            end;
      end;
      procedure Theap.swap(ii,jj : longint);
      var d : TType;
      begin
         d:=a[ii];a[ii]:=a[jj];a[jj]:=d;
      end;
var
   h : Theap;
   n : longint;
   a : array[1..10000] of TType;
procedure readfile;
var
   f : text;
   i : longint;
   k : TType;

begin
   assign(f,'');
   reset(F);
   readln(f,n);
   for i:=1 to n do
      begin
         readln(f,k.x,k.y);
         k.i:=i;
         h.push(k);
      end;
   close(f);
   if n=1 then
      begin
         writeln('1');
         halt(0);
      end;
end;
procedure CreateLine(var p1,p2 : TType;var l : TLine);
var
   x,y,a1,b1 : double;

begin
   x:=(p1.x+p2.x)/2;
   y:=(p1.y+p2.y)/2;
   a1:=p2.x - p1.x;
   b1:=p2.y - p1.y;
   l.a:=a1;
   l.b:=b1;
   l.c:=-(l.a*x + l.b*y);
end;

var
   r  : array[1..10000] of boolean;
   ans : array[1..10000] of longint;
   l : Tline;
function sym(var p : TType) : TType;
var
   l2 : TLine;
   y1,x1,k : double;
   res : TType2;
   res2 : TType;
begin
   l2.a:=-l.b;
   l2.b:=l.a;
   k:=1/(sqr(l.a)+sqr(l.b));
   l2.c:=-(p.x*l2.a + p.y*l2.b);
   y1:=-(l.a*l2.c + l.c*l.b)*k;
   x1:=(l.b*l2.c -l.a*l.c)*k;
   res.x:=x1-p.x;
   res.y:=y1-p.y;
   res.x:=res.x*2;
   res.y:=res.y*2;
   res.x:=res.x + p.x;
   res.y:=res.y + p.y;
   if (abs(res.x-round(res.x))<=0.0001)and((abs(res.y-round(res.y))<=0.0001)) then
      begin
         res2.x:=round(res.x);
         res2.y:=round(res.y);
         sym:=res2;

      end
   else
      begin
         res2.x:=-123456;
         sym:=res2;
      end;
end;
function find(var p : Ttype) : longint;
var
   l,r : longint;
begin
   l:=1;r:=n;
   if (a[n].x=p.x)and(a[n].y=p.y) then begin find:=n;exit;end;
   if (a[1].x=p.x)and(a[1].y=p.y) then begin find:=1;exit;end;
   while l<r do
      begin
         if a[(l+r) shr 1].x>p.x then
            r:=(l+r) shr 1 - 1
         else
            begin
               if a[(l+r)shr 1].x<p.x then
                  l:=(l+r) shr 1 + 1
               else
                  begin
                     l:=(l+r)shr 1;
                     r:=l;
                  end;
            end;
      end;
   if p.x=a[l].x then
     begin
        r:=0;
        while (l+r<=n)and(a[l].x=a[l+r].x) and (a[l+r].y<>p.y) do
           inc(r);
        if (p.x=a[l+r].x) and (p.y=a[l+r].y) then
           begin find:=l+r; exit; end;
        r:=0;
        while (l-r>0)and(a[l].x=a[l-r].x) and (a[l-r].y<>p.y) do
           inc(r);
        if (p.x=a[l-r].x) and (p.y=a[l-r].y) then
           begin find:=l-r; exit; end
        else
           find:=-1;
     end
   else
      find:=-1;
end;
function check(i : longint) : longint;
var
   k : TType;
begin
   k:=Sym(a[i]);
   if k.x<>-123456 then
      begin
         check:=find(k);
      end
   else
      check:=-1;
end;
procedure writefile;
var
   i,q : longint;

begin
  for i:=1 to n do
     begin
        q:=check(i);
        ans[a[i].i]:=a[q].i;
     end;
  for i:=1 to n-1 do
     write(ans[i],' ');
  writeln(ans[n]);
  halt(0);

end;
function solve1(s : longint) : longint;
var
   i,j,fl,q : longint;
   k : TType;

begin
  for i:=1 to n do if i<>s then
      begin
         fl:=0;
         CreateLine(a[s],a[i],l);
         fillchar(r,n,false);
         r[s]:=true;
         r[i]:=true;
         for j:=1 to n do if not r[j] then
            begin
               q:=check(j);
               if q=-1 then
                  begin
                     fl:=1;
                     break;
                  end;
               r[j]:=true;
               r[q]:=true;
            end;
         if fl= 0 then
            begin
               break;
            end;
      end;
  if fl=1 then
     solve1:=0
  else
     solve1:=1;
end;
procedure solve;
var
   i,j,fl,q : longint;
   k : TType;
begin
   for i:=1 to n do
      h.pop(a[i]);
   if solve1(1)=1 then
      writefile;
   if solve1(2)=1  then
      writefile;
   fl:=0;
   l.a:=(a[2].y-a[1].y);
   l.b:=(-a[2].x+a[1].x);
   l.c:=-(l.a*a[1].x + l.b*a[1].y);
   fillchar(r,n,false);
   r[1]:=true;
   r[2]:=true;
   for j:=3 to n do if not r[j] then
      begin
         q:=check(j);
         if q=-1 then
            begin
               fl:=1;
               break;
            end;
         r[j]:=true;
         r[q]:=true;
      end;
   if fl =  0 then
      writefile;
   writeln('0');
end;

begin
   readfile;
   solve;
end.
