#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long q;
  cin >> q;
  while (q--) {
    long long n, m;
    cin >> n >> m;
    vector<long long> data(n);
    for (auto &i : data) cin >> i;
    vector<long long> ind(m);
    for (auto &i : ind) cin >> i;
    sort(ind.begin(), ind.end());
    long long first = 0, second = 0;
    while (second < m) {
      if (second == m - 1 ||
          ind[second + 1] - ind[first] != second + 1 - first) {
        sort(data.begin() + ind[first] - 1, data.begin() + ind[second] + 1);
        first = second + 1;
        ++second;
      } else {
        ++second;
      }
    }
    for (long long i = 1; i < n; ++i) {
      if (data[i] < data[i - 1]) {
        cout << "NO\n";
        goto qu;
      }
    }
    cout << "YES\n";
  qu : {}
  }
  return 0;
}
