#include<stdio.h>
int main()
{
int a,b,i,j;
unsigned long long n;
scanf("%llu",&n);
struct Student
{
long int num;
float score;
} stu[n];
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
stu[i].score =a*b;
stu[i].num=i+1;
}
struct Student temp;
for(i=0;i<n-1;i++)//从第一个开始,进行n-1次排序
for(j=0;j<n-1-i;j++)//每次拍好前面的,后面的再进行比较。一点点地推到a[0]这样.
if(stu[j].score<stu[j+1].score)
{
temp=stu[j];
stu[j]=stu[j+1];
stu[j+1]=temp;
}
for(i=0;i<n-1;i++){
printf("%d “,stu[i].num);
}
printf(”%d",stu[n-1].num);
return 0;
}