#P1949C. Annual Ants' Gathering
Annual Ants' Gathering
No submission language available for this problem.
Description
Deep within a forest lies an ancient tree, home to ants living in tiny houses, indexed from to , connected by the branches of the tree.

Once a year, all the ants need to gather to watch the EUC. For this, all ants move along the branches of the tree they live on to meet at the home of one ant.
However, this year the ants could not agree on where to meet and need your help to gather up. You can tell all the ants currently at house to move to house if there is a branch directly connecting those two houses. However, the ants ignore your command if there are fewer ants gathered in house than in house , i.e., if it would be easier for the ants from house to move. This even holds true if no ant at all is currently in house . You can give this kind of commands as many times as you want.
Is it possible for you to gather all the ants in a single house?
The first line contains one integer () — the number of ant homes.
Each of the following lines contains two integers and () — there is a branch directly connecting the house and house . It is guaranteed that every ant can reach the house of any other ant just by following the branches of the tree.
Print if it is possible to gather all the ants in a single house. Otherwise, print .
Input
The first line contains one integer () — the number of ant homes.
Each of the following lines contains two integers and () — there is a branch directly connecting the house and house . It is guaranteed that every ant can reach the house of any other ant just by following the branches of the tree.
Output
Print if it is possible to gather all the ants in a single house. Otherwise, print .
Note
In the first sample, you can gather all the ants at house as follows:
- You tell to the ant at house to move to house .
- You tell to the ant at house to move to house .
- You tell to the two ants at house to move to house (which already contains two ants).
- You tell to the ant at house to move to house .
- You tell to the ant at house to move to house (which already contains two ants).
- You tell to the three ants at house to move to house (which already contains four ants).
In the second sample, it is impossible to gather all the ants in a single house.