A tree with vertices is given. Let the distance between two vertices and be . A mirror operation with respect to a vertex is defined as follows.
A sequence of length is given. Initially, you can choose any vertex as the starting vertex. Determine whether it is possible to reach some vertex of the tree by appropriately choosing a starting vertex and performing the mirror operations with respect to the vertices in order.
The input is given in the following format.
Print YES if there exists a starting vertex and a sequence of moves satisfying the conditions. Otherwise, print NO.
in the input means there is an edge between the two vertices and .
| 4 | 36 | No additional constraints. |