There are several test cases,you should process to the end of file.
For each test case, there are two integers n m on the first line, n indecates the number of the nodes, m indecates the number of countings. $1 \leq n \leq 50000, 1 \leq m \leq 500000$
The next following n-1 lines. Each line contains two integers a b, it means there is an edge between a and b. $1 \leq a, b \leq n, a \neq b$.
The next following m lines. Each line contains two integers a b, indecates the countings. $1 \leq a \leq n, 1 \leq b \leq 100000$.