CSES - HIIT Open 2019 - Many Cycles
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Given an undirected graph, your task is to find out if there is a node that belongs to more than one cycle.

Input

The first input line has an integer tt: the number of tests. Then each test has the following format:

The first line has two integers nn and mm: the number of nodes and edges. The nodes are numbered 1,2,,n1,2,\dots,n.

Then there are mm lines that describe the edges. Each line has two distinct integers aa and bb: there is an edge between nodes aa and bb.

You can assume that there is at most one edge between two nodes.

Output

For each test, print "YES", if there is a node that belongs to more than one cycle, and "NO" otherwise.

Constraints

  • 1t10001 \le t \le 1000
  • 1n,m1001 \le n, m \le 100

Example

Input:

2
4 4
1 2
1 3
1 4
2 3
4 5
1 2
1 3
1 4
2 3
3 4

Output:

NO
YES