The Dragon and the knights
The Dragon of the Wawel Castle, following the conflict with the local Shoemakers’ Guild, decided to move its hunting grounds out of Kraków, to a less hostile neighborhood. Now it is bringing havoc and terror to the peaceful and serene Kingdom of Bytes.
In the Kingdom of Bytes there are n rivers and each of them flows along a straight line (that is, you may think of the Kingdomas the Euclidean plane divided by infinite lines). No three rivers have a common point. The rivers divide the Kingdom into some districts.
Fortunately, there are m valiant knights in the Kingdom. Each of them has taken his post and swore an oath to protect his district. The Kingdom is thus protected for evermore... or is it?
It is known that Dragon will not attack a district which has at least one knight inside. The knights, however, are famous for their courage in battle, not for their intelligence. They may have for gotten to protect some of the districts.
Given a map of the Kingdom and the knights’ positions, determine whether all districts are protected.
Input
The first line of the input contains the number of test cases T. The descriptions of the test cases follow:
Each test case starts with a line containing the number of rivers n (1 ≤ n ≤ 100) and the number of knights m(1 ≤ m ≤ 50000). Then follow n lines describing rivers. The j-th of them contains three space-separated integers A_j, B_j, C_j of absolute values not exceeding 10000. These integers are the coefficients of the equation A_j·x+B_j·y+C_j=0 of the line along which the j-th river flows. After that, there are m lines describing the positions of the knights: the i-th of these lines contains two integers X_i, Y_i (−10^9 ≤ X_i, Y_i ≤ 10^9) — the coordinates of the i-th knight. You may assume that no knight is standing in a river (his shining armour would quickly rust if he did). Two knights may occupy the same post (their coordinates can be equal). No two rivers flow along the same line and no three rivers have a common point.
Output
Print the answers to the test cases in the order in which they appearin the input. For each test case, output a single line containing a single word PROTECTED if all districts are safe from the Dragon, and VULNERABLE otherwise.