#include <iostream>
using namespace std;

int main(){
    long long size, id, price, quantity;
    double p, q;
    bool noone = true;
    while (1){
	cin >> size;
	if (!size) break;
	for (int i = 0; i < size; i++){
	    cin >> id >> price >> quantity;
	    p = (double) price/100;
	    q = (double) quantity/100;
	    if (p * q >= 100){
		cout << id << endl;
		noone = false;
	    }
	}
	if (noone) cout << "NA" << endl;
	noone = true;
    }
}