Problems
Graph tournament
Graph tournament
A directed graph is called a tournament if there is exactly one edge between any pair of its different vertices. Graph is given by the list of edges. Check if it is a tournament.
Input data
The first line contains number of vertices n~(1 \le n \le 100) and number of edges m~(1 \le m \le n \cdot (n - 1)/2) in the graph. The next m lines contain the pairs of numbers — the edges of the graph.
Output data
Print "YES" if graph is tournament and "NO" otherwise.
Examples
Input example #1
4 6 1 2 1 3 4 1 2 3 4 2 4 3
Output example #1
YES