#include <bits/stdc++.h>
using namespace std;
const long long N = 200009;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    long long a[n + 5];
    long long na[n + 5];
    for (long long i = 1; i <= n; i++) {
      cin >> a[i];
      na[i] = a[i];
    }
    sort(na + 1, na + n + 1);
    long long p[m + 5];
    unordered_map<long long, long long> mp;
    for (long long i = 1; i <= m; i++) {
      cin >> p[i];
      mp[p[i]] = 1;
    }
    for (long long i = 1; i <= n; i++) {
      for (long long i = 1; i < n; i++) {
        if (mp[i] == 1 && a[i] > a[i + 1]) {
          swap(a[i], a[i + 1]);
        }
      }
    }
    long long f = 1;
    for (long long i = 1; i <= n; i++) {
      if (a[i] != na[i]) {
        f = 0;
        cout << "NO"
             << "\n";
        break;
      }
    }
    if (f == 1) {
      cout << "YES"
           << "\n";
    }
  }
  return 0;
}
