Tom has m same balanced parenthesis sequence P=p1 p2…pn of length n.
This day Jerry comes into Tom's room and swaps one pair of parenthesis in every sequence.
Tom and Jerry both like balanced parenthesis sequence, so Jerry wants to know whether each P remains balanced after pai and pbi swapped.
The first line contains an integers T (T≤20), which indicates the number of test cases.
For each case:The first line contains two integers n,m.
The i-th of the last m lines contains 2 integers ai,bi (1≤ai,bi≤n,ai≠bi).
⋅ for 50% data, 1≤n≤50,1≤q≤1000.
⋅ for 100% data, 1≤n≤100000,1≤q≤100000.
2 4 2 (()) 1 3 2 3 2 1 () 1 2
Case #1: No Yes Case #2: No