Given a tree of nodes, and two paths, one from to and another from to , find the number of nodes that are part of both paths.
The first line will contain the integer .
The second line will contain four integers, .
The next lines will each contain two integers, .
It is guaranteed the entire tree is connected.
Output the number of nodes that are part of both paths.
5 1 5 2 4 1 3 2 4 3 4 5 4
Explanation for Sample
Only node is part of both paths.