#include <bits/stdc++.h>
using namespace std;
const long long INF = 10000000000;
template <typename T1, typename T2>
void chkmax(T1& a, T2 b) {
  if (b > a) {
    a = b;
  }
}
void solve() {
  long long n, m;
  cin >> n >> m;
  vector<long long> a(n), can(n);
  for (long long& i : a) {
    cin >> i;
  }
  for (long long i = 0; i < m; ++i) {
    long long x;
    cin >> x;
    --x;
    can[x] = 1;
  }
  for (long long i = 0; i < n; ++i) {
    for (long long j = i; j > 0; --j) {
      if (a[j] < a[j - 1]) {
        if (can[j - 1]) {
          swap(a[j], a[j - 1]);
        } else {
          cout << "NO\n";
          return;
        }
      }
    }
  }
  cout << "YES\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) solve();
}
