#include <bits/stdc++.h>
using namespace std;
vector<long long> A[200001];
long long vis[200001], X[200001], f = 0, lvl[200001], vis2[200001],
                                  lvl2[200001];
void BFS(long long x) {
  queue<long long> Q;
  Q.push(x);
  vis[x] = 1;
  long long p;
  while (Q.size()) {
    p = Q.front();
    Q.pop();
    for (int i = 0; i < A[p].size(); i++) {
      if (!vis[A[p][i]]) {
        vis[A[p][i]] = 1;
        lvl[A[p][i]] = 1 + lvl[p];
        Q.push(A[p][i]);
      }
    }
  }
}
int main(void) {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int f = 1;
    vector<int> a(n), b(m), c(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    c = a;
    set<int> p;
    for (int i = 0; i < m; i++) {
      cin >> b[i];
      p.insert(b[i] - 1);
    }
    sort(c.begin(), c.end());
    map<int, int> make_pair;
    for (int i = 0; i < n; i++) {
      if (p.find(i) == p.end()) {
        if (a[i] != c[i]) {
          f = 0;
          break;
        }
      } else {
        int k = i;
        while (i < n && p.find(i) != p.end()) {
          make_pair[a[i]]++;
          i++;
        }
        make_pair[a[i]]++;
        for (int j = k; j <= i; j++) {
          if (make_pair.find(c[j]) == make_pair.end()) {
            f = 0;
            break;
          } else {
            make_pair[c[j]]--;
          }
        }
        make_pair.clear();
        if (f == 0) break;
      }
    }
    if (f == 0)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
