#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, k, a;
  cin >> t;
  while (t--) {
    vector<int> v;
    cin >> n >> k;
    for (int i = 1; i <= n; i++) {
      cin >> a;
      v.push_back(a);
    }
    vector<int> p;
    for (int i = 1; i <= k; i++) {
      cin >> a;
      p.push_back(a - 1);
    }
    int tt = 4;
    int flag = 1;
    for (int j = 1; j <= 500; j++) {
      int tried = 0;
      for (int i = 0; i < k; i++) {
        if (p[i] + 1 < n) {
          if (v[p[i]] > v[p[i] + 1]) swap(v[p[i]], v[p[i] + 1]), tried++;
        }
      }
    }
    vector<int> ano = v;
    sort(ano.begin(), ano.end());
    if (ano == v)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
