#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int t;
  cin >> t;
  while (t--) {
    int m, n;
    cin >> n >> m;
    vector<long long> A(n);
    set<long long> swps;
    for (long long i = 0; i <= n - 1; i++) cin >> A[i];
    for (long long i = 0; i <= m - 1; i++) {
      int temp;
      cin >> temp;
      swps.insert(temp);
    }
    bool lfound = false;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < (n - i - 1); j++) {
        if (A[j + 1] < A[j]) {
          if (swps.find(j + 1) != swps.end() == false) {
            lfound = true;
            break;
          } else {
            swap(A[j + 1], A[j]);
          }
        }
      }
      if (lfound) {
        break;
      }
    }
    if (lfound) {
      cout << "NO\n";
    } else
      cout << "YES\n";
  }
  return 0;
}
