#include <bits/stdc++.h>
using namespace std;
struct node{
int t,data;
double pp;
}a[25];
int t,p;
double x;
bool cmp(node x,node y){
if(x.t!=y.t){
return x.t>y.t;
}
else{
return x.pp>y.pp;
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin>>n;
for(int i=1;i<=n;i++){
cin>>t>>p>>x;
a[i].t=t,a[i].pp=p*x,a[i].data=i;
}
sort(a+1,a+1+n,cmp);
cout<<a[1].data;
return 0;
}