There are n rooms labelled 0..n-1. Room 0 is unlocked; every other room is locked. Inside rooms you find keys: an entry u v means room u contains a key that opens room v.
Starting in room 0 and collecting keys as you enter rooms, decide whether you can enter every room.
Input format
Line 1: two integers n and m (rooms and key entries).
The next m lines each contain two integers u v, meaning room u holds a key to room v.
Output format
Print YES if all n rooms can be entered, otherwise print NO.
Constraints
- 1 <= n <= 100000
- 0 <= m <= 200000
- 0 <= u, v <= n - 1
- A room may hold several keys, keys may repeat, and a key may point to its own room.