There are N cities in a country, out of which M pairs of cities have been infected by coronavirus. Let C-D denote a pair of infected cities, having a direct path between them. For every three distinct cities (C, D, E), if C-D and D-E are infected pair of cities, having direct paths between them, then if C-E also has a direct path, the country will be set on HIGH ALERT.
Print "YES", if the country is set on HIGH ALERT, otherwise print "NO".
The first line of the input contains two integers N and M — the number of cities and the number of pairs of cities that are infected by coronavirus.
The next M lines contain two distinct integers Ci and Di . Cities Ci and Di have a direct path between them. No pair of cities will appear more than once in the input.
3 ≤ N ≤ 150000
0 ≤ M ≤ min(150000, (N*(N-1))/2)
1 ≤ Ci , Di ≤ N, Ci ≠ Di
Print a single line containing "YES" or "NO".