Pahom on Water is an interactive game inspired by a short story of Leo Tolstoy about a poor man whose greed for land costs him everything. The starting screen shows a number of circular pads, each painted with a colour from the visible-light spectrum. A colour is identified by its frequency (in THz). Several pads may share the same colour, except for red and violet: there is exactly one red pad (the lowest frequency, 400 THz) and exactly one violet pad (the highest frequency, 789 THz).
Two pads may overlap, and one pad may even fully contain another pad of a different colour, but two pads never merely touch at their boundary. Pahom starts on the red pad.
The goal is to walk Pahom from the red pad to the violet pad and then back to the red pad, obeying these rules:
For each game instance, decide whether at least one full round trip (red → violet → red) is possible.
The first line contains an integer $K$ ($1 \le K \le 50$), the number of game instances. Each instance begins with a line containing an integer $N$ ($2 \le N \le 300$), the number of pads, followed by $N$ lines, one per pad. Each pad line contains the colour frequency, the $x$- and $y$-coordinates of the pad's centre, and the pad's radius, separated by single spaces.
The frequency is a real number with at most three decimal places. The coordinates and the radius are integers given in metres. Every integer value lies in the range $-10000$ to $10000$ inclusive. In every instance all frequencies lie between $400.0$ and $789.0$ inclusive, exactly one pad has frequency $400.0$, and exactly one pad has frequency $789.0$.
For each instance, print a single line containing Game is VALID if a valid round trip exists, or Game is NOT VALID otherwise.