#include<iostream>
#include<map>
#include<algorithm>
using namespace std;
main(){
 while(1){
  int n,a,b,c;
  cin>>n;
  if(n==0) break;
  map<long,int> m;
  for(;n>0;n--){
   cin>>a>>b>>c;
   m.insert(map<long,int>((long)b*c,a));
  }
  m.sort();
  cout<<(m.begin()).first<<endl;
 }
 cout<<"NA"<<endl;
}