#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, i;
    cin >> n >> m;
    int a[n + 1], b[m + 1], x = 1, j, c = 0, l = 0, srt[n + 1];
    for (i = 0; i < n; i++) {
      cin >> a[i];
      srt[i] = a[i];
    }
    sort(srt, srt + n);
    for (i = 0; i < m; i++) {
      cin >> b[i];
    }
    sort(b, b + m);
    vector<int> v;
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        if (a[b[j]] < a[b[j] - 1]) {
          swap(a[b[j]], a[b[j] - 1]);
        }
      }
    }
    if (is_sorted(a, a + n)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
