#include <iostream>
#include <fstream>
#include <cstdlib>

using namespace std;
struct cvor
{
    float x,y;
    int z;
    bool r;
};
cvor a[10000];
int n;
int cmp(const void *a,const void*b)
{
    cvor *sa=(cvor *)a;
    cvor *sb=(cvor *)b;
    if(sa->y>sb->y) return -1;
    if(sa->y<sb->y) return 1;
    return 0;
}
bool dali(cvor b,int t)
{
    if(t==-1) for(int i=0;i<n;i++){if(a[i].r==true) if(a[i].y<b.y) return true;}
    if(t==1) for(int i=0;i<n;i++){if(a[i].r==true) if(a[i].y>b.y) return true;}
    return false;
}
float koef(float x1,float y1,float x2,float y2)
{
    return (x1-x2)/(y1-y2);
}
int main()
{
    ifstream fin("flojd.in");
    ofstream fout("flojd.out");
    fin>>n;
    float q1,q2;
    for(int i=0;i<n;i++)
    {
        fin>>q1>>q2;
        a[i].y=q1;
        a[i].x=q2;
        a[i].z=i+1;a[i].r=true;
    }
    qsort(a,n,sizeof(cvor),cmp);
    int t=-1;
    float k=0;
    cvor b;
    b=a[0];
    for(int j=0;j<n;j++)
    {int i1=-1;
    for(int i=0;i<n;i++)
    {
        if(a[i].r==true)
        {
            if(t==1)
            { if (dali(a[i],t))
              if(koef(b.x,b.y,a[i].x,a[i].y)>k) {k=koef(b.x,b.y,a[i].x,a[i].y);i1=i;}
            }
            if(t==-1)
            { if (dali(a[i],t))
              if(koef(b.x,b.y,a[i].x,a[i].y)<k) {k=koef(b.x,b.y,a[i].x,a[i].y);i1=i;}
            }
        }
    }
    if(i1!=-1){ if (j==0) {a[0].r=false;a[i1].r=false;fout<<a[0].z<<endl;fout<<a[i1].z<<endl;t=-t;b=a[i1];}
                    else{a[i1].r=false;fout<<a[i1].z<<endl;t=-t;b=a[i1];}
                   }
    }
    for(int i=0;i<n;i++)if(a[i].r==true) fout<<a[i].z;
    fin.close();
    fout.close();
    return 0;
}
