#bzoj2350. Tree Mirroring
Tree Mirroring
Problem Description

Input format
The first line consists of two integers, and , representing the number of points and edges in a given graph.
Next, in the rows, two numbers and represent an edge in the graph, ensuring that there are no duplicate edges or self loops.
Output format
Output a string YES or NO to indicate whether the image is a tree-mirrored graph.
Samples
7 7
1 2
2 3
3 4
4 5
5 6
6 7
7 1
NO
Data scale and agreement
For of the data:;
For of the data:;
For all of the data:.