#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  double b, c;
  cin >> n;
  for (; n > 0; n--) {
    cin >> a >> b >> c;
    b = 1000000 / b;
    if (b >= c) cout << a << endl;
    if (b < c) cout << "NA" << endl;
  }
}
