eolymp
bolt
Try our new interface for solving problems
Problems

Complete graph

Complete graph

Undirected graph is called \textbf{complete}, if any pair of its different vertices is connected with at least one edge. For a given list of graph edges, check whether it is complete. \InputFile The first line contains the number of vertices $n~(1 \le n \le 100)$ and the number of edges $m~(1 \le m \le 10^4)$ in the graph. Then $m$ pairs of numbers are given --- the graph edges. \OutputFile Print "\textbf{YES}" if the graph is complete and "\textbf{NO}" otherwise. \includegraphics{https://static.e-olymp.com/content/aa/aa1f88122e44b3db95e6318f350ce73ec4ec41b1.gif}
Time limit 1 second
Memory limit 128 MiB
Input example #1
3 3
1 2
1 3
2 3
Output example #1
YES