The first line of input consists of a single integer $T$ $(1 \leq T \leq 30)$, denoting the number of test cases.
For each test case, the first line contains a single integer $n$ $(1 \leq n \leq 10^5)$, denoting the number of spots. Each of the next two lines contains $n$ integers, $a_1, a_2, \cdots, a_n$ and $b_1, b_2, \cdots, b_n$ $(0 \leq a_i, b_i \leq 10^9)$, denoting the
satisfactory value of Zhang and Liu for every spot, respectively. Each of the last $n - 1$ lines contains two integers $x, y$ $(1 \leq x, y \leq n, x \neq y)$, denoting a bus route between the $x$th spot and the $y$th spot. It is reachable from any spot to any other spot through these bus routes.
It is guaranteed that the sum of $n$ does not exceed $5.01 \times 10^5$.