output_description: For each dataset, print a list of employee IDs or a text "NA"
input_description: The input consists of several datasets. The input ends with a line including a
  single 0. Each dataset consists of:
  
      
      
      _n_ (the number of data in the list)
      _i_ _p_ _q_
      _i_ _p_ _q_
       :
       :
      _i_ _p_ _q_
attempt: num = int(input())
  if not num:
      exit()
  data = [[int(el) for el in input().split(" ")] for _ in range(num)]
  result = [print(i) for i, j, k in data if j * k >= 1e6]
  if not result:
      print("NA")
  
problem_description: Sale Result
  
  There is data on sales of your company. Your task is to write a program which
  identifies good workers.
  
  The program should read a list of data where each item includes the employee
  ID _i_ , the amount of sales _q_ and the corresponding unit price _p_. Then,
  the program should print IDs of employees whose total sales proceeds (i.e. sum
  of p × q) is greater than or equal to 1,000,000 in the order of inputting. If
  there is no such employees, the program should print "NA". You can suppose
  that _n_ < 4000, and each employee has an unique ID. The unit price _p_ is
  less than or equal to 1,000,000 and the amount of sales _q_ is less than or
  equal to 100,000.
samples: [{"input": "1001 2000 520\n    1002 1800 450\n    1003 1600 625\n    1001 200 1220\n    2\n    1001 100 3\n    1005 1000 100\n    2\n    2013 5000 100\n    2013 5000 100\n    0", "output": "1003\n    NA\n    2013"}]