The first line of the input contains an integer $T(1\leq T\leq 10)$, denoting the number of test cases.
In each test case, there are two integers $n,m(1\leq n\leq 10,1\leq m\leq 10^9)$ in the first line, denoting the number of soldiers and the upper bound of $x_e,y_e$.
For the next $n$ lines, each line contains four integers $x_i,y_i,k_i,t_i(0\leq x_i,y_i\leq m,2\leq k_i\leq 5,0\leq t_i<k_i)$, denoting what each soldier knows.