{
TASK:sym
LANG:PASCAL
}

type point = record
              num, x, y : longint;
             end;

const ogr = 11000;


var a : array[0..ogr] of point;
    from, too : array[-ogr..ogr] of longint;
    ans : array[0..ogr] of longint;
    r, ix, iy, i, j, k, l, o, p, m, n : longint;
    a1, b1, c1, a2, b2, c2, x, y : extended;
    x1, y1, x2, y2 : extended;
    vl, fl : longint;
    sw : point;



procedure input;
var f : text;
 begin
  assign(f, '');
  reset(f);
  readln(f, n);
  for i := 1 to n do
    begin
     readln(f, a[i].x, a[i].y);
     a[i].num := i;
    end;
  close(f);
 end;


procedure qsort(l, r : integer);
var i, j, x, y : integer;
 begin
  i := l; j := r; x := a[(i + j) div 2].x; y := a[(i + j) div 2].y;
  repeat
   while (a[i].x < x) or ((a[i].x = x) and (a[i].y < y)) do inc(i);
   while (a[j].x > x) or ((a[j].x = x) and (a[j].y > y)) do dec(j);
   if i <= j then
     begin
      sw := a[i];
      a[i] := a[j];
      a[j] := sw;
      inc(i);
      dec(j);
     end;
  until i > j;
  if i < r then qsort(i, r);
  if j > l then qsort(l, j);
 end;



procedure preprocessing;
var i : longint;
 begin
  for i := -ogr to ogr do
    begin
     from[i] := -1;
     too[i] := -1;
    end;
  a[0].x := 10101;
  a[0].y := 10101;
  a[n + 1].x := 10101;
  a[n + 1].y := 10101;
  for i := 1 to n + 1 do
    if a[i].x <> a[i - 1].x then
      begin
       from[a[i].x] := i;
       too[a[i - 1].x] := i - 1;
      end;
 end;


begin
 input;
 if n = 1 then writeln(1)
 else if n = 2 then writeln(1, ' ', 2)
 else
   begin
    qsort(1, n);
    preprocessing;
    x1 := a[1].x;
    y1 := a[1].y;
    for i := 2 to n do
      begin
       fl := 0;
       x1 := a[1].x;
       y1 := a[1].y;
       x2 := a[i].x;
       y2 := a[i].y;
       a1 := y1 - y2;
       b1 := x2 - x1;
       c1 := x1 * y2 - x2 * y1;
       x := (x1 + x2) / 2;
       y := (y1 + y2) / 2;
       a2 := -b1;
       b2 := a1;
       c2 := -a2 * x -b2 * y;
       for j := 1 to n do
         begin
          x1 := a[j].x;
          y1 := a[j].y;
          a1 := -b2;
          b1 := a2;
          c1 := -a1 * x1 -b1 * y1;
          if ((b2 * a1  - a2 * b1) = 0) and ((b1 * a2 - a1 * b2) <> 0) then y := (c2 * a1 - c1 * a2) / (b1 * a2 - a1 * b2)
          else if (b2 * a1  - a2 * b1) <> 0 then y := (c1 * a2 - c2 * a1) / (b2 * a1 - a2 * b1)
          else y := 0;
          if (a1 = 0) and (a2 <> 0) then x := (-b2 * y - c2) / a2
          else if a2 <> 0 then x := (-b1 * y - c1) / a1
          else x := 0;
          x := x + (x - x1);
          y := y + (y - y1);
          if (trunc(x) <> x) or (trunc(y) <> y) then
            begin
             fl := 1;
             break;
            end;
          ix := trunc(x);
          iy := trunc(y);
          if from[ix] = -1 then
            begin
             fl := 1;
             break;
            end;
          l := from[ix];
          r := too[ix];
          vl := 0;
          while l <= r do
            begin
             m := (l + r) div 2;
             if a[m].y = iy then
               begin
                vl := 1;
                break;
               end
             else if a[m].y > y then r := m - 1
             else if a[m].y < y then l := m + 1;
            end;
          ans[a[j].num] := a[m].num;
          if vl = 0 then
            begin
             fl := 1;
             break;
            end;
         end;
       if fl = 0 then break;
      end;
    if fl = 1 then writeln(0)
    else
      begin
       for i := 1 to n - 1 do
         write(ans[i], ' ');
       writeln(ans[n]);
      end;
   end;
end.






