#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    vector<int> ar(n), br(n);
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      ar[i] = a;
    }
    for (int i = 0; i < m; i++) {
      int pos;
      cin >> pos;
      br[pos - 1] = 1;
    }
    while (true) {
      bool ans = false;
      for (int i = 0; i < n - 1; i++) {
        if (br[i] && ar[i] > ar[i + 1]) {
          ans = true;
          swap(ar[i], ar[i + 1]);
        }
      }
      if (!ans) break;
    }
    bool ans = true;
    for (int i = 0; i < n - 1; i++) {
      ans &= ar[i] <= ar[i + 1];
    }
    if (ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
