#include <iostream>
#include <cstdio>
using namespace std;

const char inFileName[] = "flojd.in";
const char outFileName[] = "flojd.out";

const int MaxN = 5001;

int n;
long x[MaxN], y[MaxN];

int next[MaxN], prev[MaxN];
bool used[MaxN];

bool right(int a, int b, int c) {
  long long A = y[b] - y[a], B = x[a] - x[b], C = A * x[a] + B * y[a];
  return A * x[c] + B * y[c] - C > 0;
}

int find_right(int a) {
  int r = -1;
 
  for (int i = 0; i < n; i++) {
    if (i == a || used[i]) continue;
    else {
      if (r == -1) r = i;
      else if (right(a, r, i)) r = i;
    }
  }
  return r;
}

int convex_hull() {
  long ysmall = y[0];
  int ind = 0;
  for (int i = 1; i < n; i++) {
    if (y[i] < ysmall) {
      ysmall = y[i];
      ind = i;
    }
  }

  int start = ind;
  next[ind] = ind;
  prev[ind] = ind;
  bool done = false;
  while (!done) {
    int nextInd = find_right(ind);
    prev[nextInd] = ind;
    next[ind] = nextInd;
    ind = nextInd;
    if (nextInd == start) 
      done = true;
  }

  return start;
}

void delete_point(int p) {
  int s = prev[p], q = next[p];
  while (s != q) {
    int nextS = find_right(s);
    next[s] = nextS;
    prev[nextS] = s;
    s = nextS;
  }
}

int main() {	
  freopen(inFileName, "r", stdin);
  freopen(outFileName, "w", stdout);
  
scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%ld %ld", &x[i], &y[i]);
    used[i] = false;
  }

  int currentPoint = convex_hull();
  bool pickHigher = true;
  for (int i = 0; i < n - 3; i++) {
    printf("%d\n", currentPoint+1);
    int c1 = prev[currentPoint], c2 = next[currentPoint];
    used[currentPoint] = true;
    delete_point(currentPoint);
    if (pickHigher) {
      if (y[c1] > y[c2]) currentPoint = c1;
      else currentPoint = c2;
    } else {
      if (y[c1] < y[c2]) currentPoint = c1;
      else currentPoint = c2;
    }
    pickHigher = !pickHigher;
  }

  int c1 = prev[currentPoint], c2 = next[currentPoint];
  if (pickHigher) {
    if (y[c1] < y[c2]) swap(c1, c2);
  } else {
    if (y[c1] > y[c2]) swap(c1, c2);
  }
  printf("%d\n%d\n%d\n", currentPoint+1, c1+1, c2+1);
  return 0;
}
