#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    long long arr[n];
    for (long long i = 0; i < n; i++) cin >> arr[i];
    set<long long> S;
    for (long long i = 0; i < m; i++) {
      long long x;
      cin >> x;
      S.insert(x);
    }
    long long elem = INT_MIN, f = 0;
    for (long long i = 0; i < n; i++) {
      if (arr[i] >= elem) {
        elem = arr[i];
      } else {
        long long j = i;
        while (j >= 1 && arr[j] < arr[j - 1]) {
          if (S.find(j) != S.end()) {
            swap(arr[j], arr[j - 1]);
          } else {
            f = 1;
            break;
          }
          j--;
        }
        if (f) break;
      }
    }
    if (f)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
