Graph tournament
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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
The first line contains number of vertices and number of edges in the graph. The next lines contain the pairs of numbers — the edges of the graph.
Output
Print "YES" if graph is tournament and "NO" otherwise.
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 46%