Given a connected undirected graph with $n$ vertices and $m$ edges, where all vertices are labeled with integers from $1$ to $n$. Initially, each vertex $u$ has a weight $a_u$. You can perform the following operation any number of times:
- Choose two vertices $u, v$ such that there is an edge between $u$ and $v$, and set $a_u = \min(a_u, a_v)$.
Given $b_1, \ldots, b_n$, determine whether it is possible to transform $a$ into $b$ through a sequence of operations. If it is possible, output Yes, otherwise output No.
There are $T$ test cases in total.
Input
The first line contains an integer $T$, representing the number of test cases.
For each test case, the first line contains two integers $n$ and $m$.
The second line contains $n$ integers, $a_1, \ldots, a_n$.
The third line contains $n$ integers, $b_1, \ldots, b_n$.
The next $m$ lines each contain two integers $u, v$, representing an edge between $u$ and $v$.
Output
Output $T$ lines, each containing Yes or No, representing the answer for the $i$-th test case.
Examples
Input 1
2 4 4 3 3 2 1 2 1 2 1 1 2 2 3 3 4 4 2 4 4 3 3 2 1 1 2 2 1 1 2 2 3 3 4 4 2
Output 1
Yes No
Constraints
For $100\%$ of the data, $1\le n\le 1.5\times 10^5$, $1\le m\le 2\times 10^5$, $\sum n\times m \le 5\times 10^6$.
Subtask 1 ($20\%$): It is guaranteed that there exists a vertex connected to all other vertices, and $m = n-1$.
Subtask 2 ($40\%$): It is guaranteed that the graph is a tree.
Subtask 3 ($40\%$): No special restrictions.