Bunkers
Petya and Vasya are enthusiastically playing spies. Today, they are deciding on the locations for their secret bunkers and headquarters.
They have determined that they need exactly n bunkers, which will be numbered from 1 to n for secrecy. Some of these bunkers will be connected by bidirectional tunnels. For both reliability and secrecy, it must be possible to travel between any two bunkers using a unique path. Petya and Vasya have already decided which bunkers will be connected by tunnels, but they haven't chosen which one will serve as the headquarters. They want to select a headquarters and divide the remaining bunkers between themselves so that each has an equal number of bunkers. Additionally, exactly two tunnels should lead to the headquarters: one from a bunker assigned to Vasya and the other from a bunker assigned to Petya.
After a long day, Petya went home. The next morning, Vasya presented him with a plan where the bunkers were depicted as points and the tunnels as lines. Vasya had chosen the headquarters such that the plan was symmetrical with respect to a line passing through the point representing the headquarters.
Although Petya quickly pointed out that Vasya had made a mistake by not drawing half of the bunkers, he became curious about whether it is possible to choose a headquarters and create such a symmetrical plan.
Input
The first line of the input contains a single integer n (1 ≤ n ≤ 10^5) - the number of bunkers. The next n-1 lines each contain two integers u_i and v_i (1 ≤ u_i, v_i ≤ n, u_i ≠ v_i) - indicating the bunkers connected by the i-th tunnel. It is guaranteed that there is a unique path between any two bunkers.
Output
Print YES if it is possible to choose a headquarters and create such a symmetrical plan, or NO if it is not possible.