#include <bits/stdc++.h>
using namespace std;
struct NODE {
  int v, id;
} a[110];
int T, n, m, h, flag, vis[110];
bool CMP(NODE x, NODE y) {
  return x.v < y.v ? 1 : (x.v == y.v ? x.id < y.id : 0);
}
int main() {
  cin >> T;
  while (T--) {
    cin >> n >> m;
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= n; i++) cin >> a[i].v, a[i].id = i;
    for (int x, i = 1; i <= m; i++) cin >> x, vis[x] = 1;
    sort(a + 1, a + n + 1, CMP);
    flag = 1;
    for (int i = 1; i <= n; i++)
      for (int j = a[i].id; j < i; j++)
        if (!vis[j]) flag = 0;
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
