#include <bits/stdc++.h>
using namespace std;
int issorted(int a[], int n) {
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i + 1]) return 0;
  }
  return 1;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, p, f = 0, mini = INT_MAX, maxi = INT_MIN, l, h, f1 = 0, f2 = 0;
    cin >> n >> m;
    int a[n + 1];
    vector<int> v(m + 1);
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 1; i <= m; i++) {
      cin >> v[i];
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] > maxi) {
        maxi = a[i];
        h = i;
      } else if (a[i] < mini) {
        mini = a[i];
        l = i;
      }
    }
    sort(v.begin(), v.end());
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j < n; j++) {
        if (a[j] > a[j + 1]) {
          auto it = find(v.begin(), v.end(), j);
          if (it != v.end()) {
            swap(a[j], a[j + 1]);
          }
        }
      }
    }
    if (!issorted(a, n))
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}
