Appro is an exceptional tech-savvy manager of two bars in never-never land. Both the bars are well known for their nightly brawls.
There are total N guests to be admitted in both the bars. Some guests have potential conflicts in between them. Appro has this task to split the guests into 2 groups, such that no two guests with a potential conflict between them end up in the same group.
This is of course an excessive amount of work for her.She contacts you for help.Help her out!
Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
The first line of each test case contains two space-separated integers N and M, denoting the number of guests and the number of pairs representing the conflicts.
The next M lines contain two space-separated integers ai and bi, denoting that persons ai and bi have a conflict in between them.All pairs are unique.
Output
For each test case, output a single line containing word "YES" (without quotes) if the guests can be divided into two groups such that no fight breaks out in each group and "NO" (without quotes) otherwise.
Constraints
1≤T≤100
1≤N,M≤105
1≤ai,bi≤N