#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7, INF = 1e18;
long long int POW(long long int x, long long int y) {
  long long int res = 1;
  if (y < 0) {
    res = 0;
  }
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % mod;
      y--;
    }
    x = (x * x) % mod;
    y = y >> 1;
  }
  return res;
}
void soln() {
  long long int i, j, i1, i2, i3;
  long long int TC, n, q, k, x;
  cin >> TC;
  while (TC--) {
    long long int k;
    cin >> n >> k;
    vector<long long int> v(n);
    for (long long int i = 0; i < n; i++) {
      cin >> v[i];
    }
    vector<long long int> pos, ideal = v;
    sort(ideal.begin(), ideal.end());
    for (long long int i = 0; i < k; i++) {
      cin >> x;
      pos.push_back(x);
      ;
    }
    for (long long int i = 0; i < 100; i++) {
      for (long long int j = 0; j < k; j++) {
        long long int ind = pos[j] - 1;
        if (v[ind + 1] < v[ind]) {
          swap(v[ind], v[ind + 1]);
        }
      }
    }
    if (v == ideal) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  soln();
  return 0;
}
