A meeting of programming contest organizers is held in Amsterdam this week. Seongjin, the president of the National Union of University Programming Contest Clubs, wants to eavesdrop on it. He hid wiretap devices near the meeting room. Each device records without stopping and sends what it picks up over radio.
Seongjin handed receivers to union members and spread them across several places. Radio signals interfere with one another, so there can be places where nothing is heard at all. Given the position of one member holding a receiver, write a program that finds the wiretap device that person can hear.
The device audible at a position is the i-th device that satisfies the following inequality.
ri>6(B+∑j=irj)
The first line contains the number of test cases. This value does not exceed 100.
The first line of each test case contains the number of wiretap devices n (0≤n≤100,000). The second line contains the background noise level B (0≤B≤1,000,000). The third line contains the x coordinate x and the y coordinate y of the person holding the receiver. Each of the next n lines contains the position xi, yi of the i-th device and its signal strength si (0≤si≤1,000,000).
Every coordinate lies in the interval [0,10000]. Every device position Pi differs from the receiver position Plisten. No input is given in which floating point error changes the answer.
For each test case, print the number of the audible wiretap device on its own line. If no device can be heard, print NOISE.
Device numbers start at 1. Two devices can never satisfy the inequality at the same time, so the answer is unique.