#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m;
    cin >> n >> m;
    long long int a[n];
    unordered_set<long long int> s;
    for (long long int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) {
      long long int x;
      cin >> x;
      s.insert(x);
    }
    long long int sm[n], f = 0;
    sm[n - 1] = a[n - 1];
    for (long long int i = n - 2; i >= 0; i--) sm[i] = min(a[i], sm[i + 1]);
    long long int l = a[0];
    for (int i = 0; i < n - 1; i++) {
      l = max(a[i], l);
      if (l > sm[i + 1]) {
        if (s.find(i + 1) == s.end()) {
          f = 1;
          break;
        }
      }
    }
    if (f == 1)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
