/*
TASK:sym
LANG:C++
*/

#include <stdio.h>
#include <math.h>

struct point {
double x, y;
};

point points[10001];
int result[10001], n, i, j, k;
double minX=30000, minY=30000, maxX=-30000, maxY=-30000;

void print() {
for (int i=1; i<=n; i++) printf("%d ", result[i]);
printf("\n");
}

int main () {

int minPX, minPY, maxPX, maxPY;

// freopen("sym.txt", "r", stdin);
scanf("%d", &n);

for (i=1; i<=n; i++) {
  scanf("%lf%lf", &points[i].x, &points[i].y);
  if (points[i].x < minX) { minPX = i; minX = points[i].x; }
  if (points[i].x > maxX) { maxPX = i; maxX = points[i].x; }
  if (points[i].y < minY) { minPY = i; minY = points[i].y; }
  if (points[i].y > maxY) { maxPY = i; maxY = points[i].y; }
  }
// etap 1
double x = 1.0 * (minX + maxX) / 2;
int found = 1;

for (i=1; i<=n; i++)
  if (!result[i])
    if (points[i].x == x) result[i] = i; else {
      found = 0;
      for (j=i+1; j<=n; j++)
        if (points[i].y == points[j].y && x - points[i].x == points[j].x - x) {
         result[i] = j;
         result[j] = i;
         found = 1;
         break;
         }

      if (!found) break;
      }

if (found) {
  print();
  return 0;
  }

//etap 2
found = 1;
for (i=1; i<=n; i++) result[i] = 0;
double y = 1.0 * (minY + maxY) / 2;

for (i=1; i<=n; i++)
  if (!result[i])
    if (points[i].y == y) result[i] = i; else {
      found = 0;
      for (j=i+1; j<=n; j++)
        if (points[i].x == points[j].x && y - points[i].y == points[j].y - y) {
         result[i] = j;
         result[j] = i;
         found = 1;
         break;
         }

      if (!found) break;
      }

if (found) {
  print();
  return 0;
  }


// etap 3
found = 1;
for (i=1; i<=n; i++) result[i] = 0;
point mid_point;
mid_point.x = 1.0 * (points[maxPX].x + points[minPY].x) / 2;
mid_point.y = 1.0 * (points[maxPX].y + points[minPY].y) / 2;
double a = -1, b = mid_point.x + mid_point.y;

for (i = 1; i<=n; i++)
  if (!result[i]) {
    if (a*points[i].x + b == points[i].y) result[i] = i; else {
      found = 0;

      for (j=i+1; j<=n; j++)
        if (points[i].x != points[j].x) {
         double a1 = (points[i].y - points[j].y) / (points[i].x - points[j].x) * 1.0;
         point Cpoint;
         Cpoint.x = (points[i].x + points[j].x) / 2;
         Cpoint.y = (points[i].y + points[j].y) / 2;
         if (a*Cpoint.x + b == Cpoint.y && a1 == 1.0) {
           result[i] = j;
           result[j] = i;
           found = 1;
           break;
           }
         }
      }
  if (!found) break;
  }

if (found) {
  print();
  return 0;
  }

// etap 4

found = 1;
for (i=1; i<=n; i++) result[i] = 0;
mid_point.x = 1.0 * (points[maxPX].x + points[maxPY].x) / 2;
mid_point.y = 1.0 * (points[maxPX].y + points[maxPY].y) / 2;
a = 1; b = mid_point.y - mid_point.x;

for (i = 1; i<=n; i++)
  if (!result[i]) {
    if (a*points[i].x + b == points[i].y) result[i] = i; else {
      found = 0;

      for (j=i+1; j<=n; j++)
        if (points[i].x != points[j].x) {
         double a1 = (points[i].y - points[j].y) / (points[i].x - points[j].x) * 1.0;
         point Cpoint;
         Cpoint.x = (points[i].x + points[j].x) / 2;
         Cpoint.y = (points[i].y + points[j].y) / 2;
         if (a*Cpoint.x + b == Cpoint.y && a1 == -1.0) {
           result[i] = j;
           result[j] = i;
           found = 1;
           break;
           }
         }
      }
  if (!found) break;
  }

if (found) {
  print();
  return 0;
  }


printf("0\n");
return 0;
}
