#include <bits/stdc++.h>
using namespace std;
signed main() {
  std ::ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, m, flag = 0;
    cin >> n >> m;
    vector<long long> v(n), p(m);
    vector<pair<long long, long long>> m1(n);
    map<long long, bool> mp;
    for (long long i = 0; i < n; i++) {
      cin >> m1[i].first;
      m1[i].second = i;
    }
    for (long long i = 0; i < m; i++) {
      cin >> p[i];
      mp[p[i] - 1] = true;
    }
    sort((m1).begin(), (m1).end());
    for (long long i = 0; i < n; i++) {
      if (m1[i].second == i) continue;
      if (m1[i].second < i) {
        for (long long j = m1[i].second; j < i; j++) {
          if (!mp[j]) {
            flag = 1;
            break;
          }
        }
      } else {
        for (long long j = i; j < m1[i].second; j++) {
          if (!mp[j]) {
            flag = 1;
            break;
          }
        }
      }
      if (flag == 1) break;
    }
    if (flag)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
