#include <bits/stdc++.h>
using namespace std;
vector<int> v, vv;
bool b[101], bb;
int sz, q, k, n, m;
int main() {
  cin >> q;
  for (int w = 0; w < q; w++) {
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      cin >> sz;
      v.push_back(sz);
      vv.push_back(sz);
    }
    for (int i = 0; i < m; i++) {
      cin >> sz;
      b[sz] = true;
    }
    sort(vv.begin(), vv.end());
    for (int i = 1; i < n + 1; i++) {
      k = 1;
      while (vv[k - 1] != v[i - 1]) {
        k++;
      }
      vv[k - 1] = 0;
      for (int j = i; j < k; j++) {
        if (b[j] == false) {
          bb = true;
          break;
        }
      }
      if (bb == true) break;
    }
    if (bb == true)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      b[i] = false;
    }
    v.clear();
    vv.clear();
    bb = false;
  }
  return 0;
}
