#include <bits/stdc++.h>
using namespace std;
void OJ();
void solve() {
  int n, m;
  cin >> n >> m;
  vector<int> vec(n);
  set<int> s;
  for (int& i : vec) cin >> i;
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    s.insert(x);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (vec[j] < vec[i]) {
        int idx = j;
        while (idx != i) {
          if (s.find(idx) != s.end()) {
            swap(vec[idx], vec[idx - 1]);
          } else {
            cout << "NO\n";
            return;
          }
          idx--;
        }
      }
    }
  }
  cout << "YES\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  OJ();
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
void OJ() {}
