St Andrews Online Judge

Concert Organiser

By Kay Akashi

Time: 1000 ms
Memory: 256000 kB

The code judging system is only available during contests. Check out the github repo for test cases and solutions.

Please log in.

Problem Statement

Kay and Alden are organising a classical music concert.

Kay is in charge of organising a concert venue, and Alden is in charge of creating a programme. There're NN pieces being performed in the concert, and in determining the order of the pieces, he asks Kay if he has any preference over the order, and Kay said he wants the piece pip_{i} to be performed before piece qiq_{i} (1iM1 \leq i \leq M).

Can Alden create a programme that follows all of Kay's MM requests?

Constraints

2N,M1052 \leq N, M \leq 10^{5}. 1pi,qiN1 \leq p_{i}, q_{i} \leq N (piqip_{i} ≠ q_{i}).

Input

The first line of input consists of two integers, NN and MM. Then, MM lines follow, each of which consists of two integers, pip_{i} and qiq_{i}.

Output

If Alden is able to create a programme that completely agrees with MM requests by Kay, output "Yes". Otherwise, "No".

Examples

Input

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

Output

Yes

Explanation

If the order of pieces is 423154 → 2 → 3 → 1 → 5, all the requests are satisfied.

Input

4 4
1 2
2 3
3 4
4 1

Output

No

Explanation

44 conditions cannot be satisfied simultaneously.