#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m;
    cin >> n >> m;
    vector<long long int> v(n);
    for (auto &x : v) cin >> x;
    vector<long long int> p(n);
    for (long long int i = 0; i < m; i++) {
      long long int pos;
      cin >> pos;
      p[pos - 1] = 1;
    }
    while (true) {
      bool ok = false;
      for (long long int i = 0; i < n; i++) {
        if (p[i] & v[i] > v[i + 1]) {
          ok = true;
          long long int temp;
          temp = v[i + 1];
          v[i + 1] = v[i];
          v[i] = temp;
        }
      }
      if (!ok) break;
    }
    vector<long long int> cpy(n);
    cpy = v;
    sort(cpy.begin(), cpy.end());
    long long int flag = 0;
    for (long long int i = 0; i < n; i++) {
      if (cpy[i] != v[i]) {
        flag = 1;
        break;
      }
    }
    if (flag)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
