#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[200], flag[200], qz[200];
int n, m;
bool judge() {
  for (int i = 1; i < n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (a[j] < a[i]) {
        int aa = qz[j - 1] - qz[i - 1], bb = j - i;
        if (aa < bb) return 0;
      }
    }
  }
  return 1;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    memset(flag, 0, sizeof(flag));
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; ++i) scanf("%d", a + i);
    for (int i = 1; i <= m; ++i) {
      int x;
      scanf("%d", &x);
      flag[x] = 1;
    }
    for (int i = 1; i <= n; ++i) {
      qz[i] = qz[i - 1] + flag[i];
    }
    if (judge())
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
