L. Permutation Compression
time limit per test
1 s
memory limit per test
1024 mebibytes
input
standard input
output
standard output

Grammy has a permutation of length $$$n$$$. She wants to delete some useless elements in the permutation, so she decided to use some magic tool to delete them. There are $$$k$$$ magic tools, the $$$i$$$-th of them can delete the maximum element of an interval of length exactly $$$\ell_i$$$. Each magic tool can be used at most once.

After each deletion, the length of the array decreases by one, and the neighbors of the deleted element become neighbors themselves.

Before using the tool, Grammy shows you her blueprint of the array after deletion. The new array consists of exactly $$$m$$$ distinct elements from $$$1$$$ to $$$n$$$. Please help Grammy to determine whether it is possible to delete the elements by using the magic tool, so that the result is equal to the blueprint.

Input

There are multiple test cases.

The first line contains an integer $$$T$$$ ($$$1 \leq T \leq 10^5$$$), denoting the number of test cases.

For each test case:

The first line contains three integers $$$n$$$, $$$m$$$, $$$k$$$ ($$$1 \leq m \leq n \leq 2 \cdot 10^5$$$, $$$1\leq k\leq 2\cdot 10^5$$$), denoting the length of the permutation, the length of the compressed array, and the parameter of the magic tool.

The second line contains $$$n$$$ distinct integers $$$a_i$$$ ($$$1 \leq a_i \leq n$$$), denoting the initial permutation. It is guaranteed that the elements are distinct.

The third line contains $$$m$$$ distinct integers $$$b_i$$$ ($$$1 \leq b_i \leq n$$$), denoting the array after compression. It is guaranteed that the elements are distinct.

The fourth line contains $$$k$$$ integers $$$\ell_i$$$ ($$$1 \leq \ell_i \leq n$$$), denoting the magic tools.

It is guaranteed that $$$\sum n\leq 2\cdot 10^5$$$ and $$$\sum k\leq 2\cdot 10^5$$$.

Output

For each test case, output "YES" or "NO" on a separate line, denoting the answer to the problem.

Example
Input
3
5 2 3
5 1 3 2 4
5 2
1 2 4
5 5 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
3 2 2
3 1 2
3 2
2 3
Output
YES
YES
NO