#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    vector<int> p(n);
    for (int i = 0; i < m; ++i) {
      int pos;
      cin >> pos;
      p[pos - 1] = 1;
    }
    while (true) {
      bool flag = false;
      for (int i = 0; i < n; i++) {
        if (p[i] && a[i] > a[i + 1]) {
          flag = true;
          swap(a[i], a[i + 1]);
        }
      }
      if (!flag) break;
    }
    bool possible = true;
    for (int i = 0; i < n - 1; i++) {
      possible &= (a[i] <= a[i + 1]);
    }
    if (possible)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
