Man in the Middle

No attempts yetTime limit3sMemory limit256 MB

Problem

In a connected social network, a Man in the Middle is a person whose departure disconnects the network. Report whether any such person exists.

Input

The first line contains TT test cases (T15T \le 15). Each test case gives NN, MM, and MM friendship pairs.

Output

Print YES if the network has a Man in the Middle, otherwise print NO.