#include<iostream>
#include<vector>

using namespace std;

int main(){
  int i, j, n, id, x, y;
  double sum;
  vector<int> data;

  while(1){
    cin >> n;
    if(n == 0) break;

    for(i=0; i<n; ++i){
      cin >> id >> x >> y;
      sum = 0.000001 * (double)x * (double)y;
      if(sum >= 1.0) data.push_back(id);
    }

    if(data.empty()){
      cout << "NA" << endl;
    }else{
      for(i=0; i<data.size(); ++i)
	cout << data[i] << endl;
    }
    data.clear();
  }
  return 0;
}