Mr. Nežmah has a peculiar taste in triples. He likes $$$m$$$ unordered triples of pairwise distinct numbers $$$(a_i, b_i, c_i)$$$.
A cycle of length $$$k$$$ is a sequence of (not necessarily distinct) numbers $$$v_1, \ldots, v_k$$$ where every three consecutive numbers form a triple Nežmah likes, as well as $$$(v_{k-1}, v_k, v_1)$$$ and $$$(v_k, v_1, v_2)$$$.
A cycle is crooked if its length is not divisible by 3. Check whether there exists a crooked cycle.
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 2 \cdot 10^4$$$), the number of test cases.
The first line of each test case contains a single integer $$$m$$$ ($$$1 \leq m \leq 2 \cdot 10^5$$$).
The following $$$m$$$ lines contain integers $$$a_i$$$, $$$b_i$$$, and $$$c_i$$$ ($$$1 \leq a_i, b_i, c_i \leq 2 \cdot 10^5$$$). The numbers $$$a_i$$$, $$$b_i$$$, and $$$c_i$$$ are pairwise distinct for each $$$i$$$, and all unordered triples are distinct.
It is guaranteed that the sum of $$$m$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, output $$$\texttt{yes}$$$ if there exists a crooked cycle; otherwise, output $$$\texttt{no}$$$.
341 2 32 3 43 4 14 1 283 2 56 3 77 3 21 5 65 2 67 4 63 2 63 2 177 4 62 3 77 2 45 4 63 6 75 3 61 4 6
yes yes no
In the second test case $$$(2\,3\,5\,2\,6\,3\,2\,7\,3\,6)$$$ forms a crooked cycle (although there are smaller ones as well).
| Name |
|---|


