#include <bits/stdc++.h>
using namespace std;
vector<float> a;
vector<int> p;
vector<bool> can;
const float eps = 0.00001;
bool kraj(int e, int pos) {
  for (int i = pos; i < e; i++) {
    if (can[i] == false) {
      return false;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t, counter;
  cin >> t;
  for (counter = 0; counter < t; counter++) {
    int n, m, i, j;
    cin >> n >> m;
    vector<float> s;
    s.resize(n);
    a.resize(n);
    p.resize(m);
    can.resize(n);
    for (i = 0; i < n; i++) {
      can[i] = false;
    }
    for (i = 0; i < n; i++) {
      cin >> a[i];
      s[i] = a[i] + i * eps;
      a[i] = a[i] + i * eps;
    }
    for (i = 0; i < m; i++) {
      cin >> p[i];
      can[p[i] - 1] = true;
    }
    sort(s.begin(), s.end());
    bool moze = true;
    for (i = n - 1; i > -1; i--) {
      for (j = n - 1; j > -1; j--) {
        if (a[j] == s[i]) {
          moze = moze & (kraj(i, j));
        }
      }
    }
    if (moze) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
