Given a graph, output "Yes" if it's a forest, otherwise "No".
Hint: You can use disjoint set or a DFS with adjacency list to solve this problem.
For each case, The first line contains two positive integers N and M (2 <= N <= 1000000), and N denotes the number of node. In the next M lines, there will be two integers A and B, denoting the two end points of an edge (A, B).
Each case is separated by a blank line. The input is terminated by two zeros in place of N and M.
For each case a line, output "Yes" if it's a forest, otherwise "No".