#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  long long int T, i, j, k, l;
  cin >> T;
  while (T--) {
    long long int m, n, a;
    cin >> n >> m;
    bool hash[100008] = {false};
    long long int mink[100005] = {}, maxk[100009] = {}, jjj[100009] = {};
    for (i = 0; i <= (n + 1); i++) {
      maxk[i] = -1;
      mink[i] = n + 1;
    }
    vector<long long int> vk, vs, rkl;
    vector<pair<long long int, long long int> > hhkk;
    for (i = 0; i < n; i++) {
      cin >> a;
      vk.push_back(a);
      vs.push_back(a);
      jjj[a] = i;
      hhkk.push_back({a, i});
    }
    sort(vs.begin(), vs.end());
    sort(hhkk.begin(), hhkk.end());
    for (i = 0; i < m; i++) {
      cin >> a;
      hash[a - 1] = true;
      rkl.push_back(a - 1);
    }
    sort(rkl.begin(), rkl.end());
    long long int mn = INT_MAX, mx = INT_MIN;
    bool bto = false;
    for (i = 0; i < n; i++) {
      if (hash[i] == true) {
        mn = min(mn, i);
        mink[i] = mn;
        bto = true;
      } else {
        if (bto == true) {
          mn = min(mn, i);
          mink[i] = mn;
          bto = false;
        }
        mn = INT_MAX;
      }
    }
    bto = false;
    for (i = n - 1; i >= 0; i--) {
      if (hash[i] == true) {
        mx = max(mx, i);
        maxk[i] = mx;
      } else {
        mx = INT_MIN;
        if (hash[i - 1] == true) {
          mx = max(mx, i);
          maxk[i] = mx;
        }
      }
    }
    bool ans = true;
    long long int yyy = 0;
    for (i = 0; i < n; i++) {
      yyy = hhkk[i].second;
      if (vs[i] != vk[i]) {
        if ((mink[i] <= yyy) && (yyy <= maxk[i])) {
        } else {
          ans = false;
          break;
        }
      }
    }
    if (ans == true) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
