#include <bits/stdc++.h>
using namespace std;
const int mx = 101;
bool solve() {
  int i, j, t, k;
  cin >> t >> k;
  int a[t + 5];
  vector<int> v;
  for (i = 0; i < t; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  sort(v.begin(), v.end());
  set<int> s;
  for (i = 0; i < k; i++) {
    int n;
    cin >> n;
    s.insert(n);
  }
  for (i = 1; i < t; i++) {
    int num = a[i];
    for (j = i - 1; j >= 0; j--) {
      if (num < a[j]) {
        if (s.find(j + 1) == s.end()) return 1;
        swap(a[j], a[j + 1]);
      } else
        break;
    }
  }
  for (i = 0; i < t; i++)
    if (v[i] != a[i]) return 1;
  cout << "YES\n";
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int test;
  cin >> test;
  while (test--)
    if (solve()) cout << "NO\n";
  return 0;
}
