#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    vector<long long> v, w, p;
    for (long long i = 0; i < n; i++) {
      long long x;
      cin >> x;
      v.push_back(x);
      w.push_back(x);
    }
    sort(w.begin(), w.end());
    for (long long i = 0; i < m; i++) {
      long long x;
      cin >> x;
      p.push_back(x);
    }
    long long flag = 0;
    sort(p.begin(), p.end());
    long long l = p[0] - 1, r = p[0];
    for (long long i = 1; i < m; i++) {
      if (p[i] != (p[i - 1] + 1)) {
        sort(v.begin() + l, v.begin() + r + 1);
        l = p[i] - 1;
        r = p[i];
      } else
        r = p[i];
    }
    sort(v.begin() + l, v.begin() + r + 1);
    for (long long i = 0; i < n; i++) {
      if (v[i] != w[i]) {
        flag = 1;
        break;
      }
    }
    if (flag)
      cout << "NO" << '\n';
    else
      cout << "YES" << '\n';
  }
  return 0;
}
