#include <bits/stdc++.h>
using namespace std;
string solve() {
  long long n, m;
  cin >> n >> m;
  vector<long long> A(n), P(m);
  for (long long &x : A) cin >> x;
  for (long long &x : P) cin >> x;
  unordered_set<long long> mp(P.begin(), P.end());
  long long currmax = 0;
  for (int i = 0; i < n; i++) {
    long long mini = A[i], maxi = A[i];
    while (i < n - 1 && mp.find(i + 1) != mp.end()) {
      i++;
      mini = min(mini, A[i]);
      maxi = max(maxi, A[i]);
    }
    if (mini < currmax) return "NO";
    currmax = maxi;
  }
  return "YES";
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cout << solve() << endl;
  }
}
