#include <bits/stdc++.h>
using namespace std;
int main() {
  set<int> x;
  int t, n, i, j, m;
  vector<int> a;
  cin >> t;
  while (t--) {
    cin >> n >> m;
    int k = 0;
    for (i = 0; i < n; i++) {
      cin >> j;
      a.push_back(j);
    }
    for (i = 0; i < m; i++) {
      cin >> j;
      x.insert(j - 1);
    }
  q:
    for (i = 0; i < n - 1; i++) {
      if (a[i] > a[i + 1]) {
        if (x.count(i)) {
          swap(a[i], a[i + 1]);
          goto q;
        } else {
          k = 1;
          break;
        }
      }
    }
    if (k == 1)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
    x.clear();
    a.clear();
  }
}
