#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize "trapv"
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long m, n, f = 1, g;
    cin >> n >> m;
    long long a[n];
    set<long long> s;
    map<long long, long long> v;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long p[m];
    for (long long i = 0; i < m; i++) {
      cin >> p[i];
      v[p[i] - 1]++;
    }
    while (1) {
      g = 1;
      for (long long i = 1; i < n; i++) {
        if (a[i] < a[i - 1]) {
          g = 0;
          if (v.find(i - 1) != v.end()) {
            swap(a[i], a[i - 1]);
          } else {
            g = 1;
            break;
          }
        }
      }
      if (g) break;
    }
    for (long long i = 1; i < n; i++) {
      if (a[i] < a[i - 1]) {
        f = 0;
        break;
      }
    }
    if (f)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
