#include <bits/stdc++.h>
using namespace std;
const int NN = 110;
int t, m, n, a[NN], vis[NN], p[NN], l, ans;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &m);
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < m; i++) {
      scanf("%d", &p[i]);
      vis[p[i] - 1] = 1;
    }
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n - 1 - i; ++j) {
        if (a[j] > a[j + 1] && vis[j]) {
          int tmp = a[j];
          a[j] = a[j + 1];
          a[j + 1] = tmp;
        }
      }
    }
    bool f = true;
    for (int i = 1; i < n; i++)
      if (a[i] < a[i - 1]) f = false;
    if (f == false)
      printf("NO\n");
    else
      printf("YES\n");
  }
  return 0;
}
