$N$ lawyers have been indicted for fraud. The $N$ lawyers intend to defend each other to ensure everyone is acquitted.
Lawyer $A$ can defend lawyer $B$ if and only if lawyer $B$ trusts lawyer $A$. There are $M$ such pairs $(A, B)$ where this is possible.
Since each lawyer is highly skilled, anyone who receives at least one defense is guaranteed to be acquitted.
However, if two lawyers $A$ and $B$ defend each other (i.e., $A$ defends $B$ and $B$ defends $A$), it is considered highly suspicious, and both will be found guilty.
For each pair $(A, B)$, you must decide whether lawyer $A$ will defend lawyer $B$ such that every lawyer is acquitted. Determine if this is possible.
Input
The first line contains $N$ and $M$ ($1 \le N, M \le 200000$). The following $M$ lines each contain $A_i$ and $B_i$ ($1 \le A_i, B_i \le N$, $A_i \neq B_i$).
This means lawyer $A_i$ can defend lawyer $B_i$. No pair $(A, B)$ appears more than once.
Output
If it is possible for every lawyer to receive at least one defense while ensuring no two lawyers defend each other, output YES on the first line. Otherwise, output NO.
Examples
Input 1
3 3 1 2 2 3 3 1
Output 1
YES
Input 2
4 6 1 2 1 3 1 4 2 3 2 4 3 4
Output 2
NO
Input 3
4 4 1 2 2 1 3 4 4 3
Output 3
NO