#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long m, n;
    cin >> n >> m;
    long long a[n];
    for (long long i = 0; i < n; i++) cin >> a[i];
    long long b[m];
    set<long long> s1;
    for (long long i = 0; i < m; i++) {
      long long x;
      cin >> x;
      s1.insert(x);
    }
    vector<long long> s;
    for (long long i = 0; i < n - 1; i++) {
      for (long long j = 0; j < n - 1 - i; j++) {
        if (a[j] > a[j + 1]) {
          long long temp = a[j];
          a[j] = a[j + 1];
          a[j + 1] = temp;
          s.push_back(j + 1);
        }
      }
    }
    long long flag = 0;
    for (long long i = 0; i < s.size(); i++) {
      if (s1.find(s[i]) == s1.end()) {
        flag = 1;
        break;
      }
    }
    if (flag == 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
