#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, p, i, j, k, a[2000], b[2000], c, d;
  cin >> t;
  while (t--) {
    cin >> n >> p;
    c = 0;
    d = 0;
    a[0] = 0;
    a[n + 1] = 9999;
    for (i = 1; i <= n; i++) cin >> a[i];
    for (i = 0; i < p; i++) cin >> b[i];
    for (i = 1; i <= n; i++) {
      for (j = 0; j < p; j++) {
        if (a[b[j]] > a[b[j] + 1]) swap(a[b[j]], a[b[j] + 1]);
      }
    }
    for (k = 1; k < n; k++) {
      if (a[k] > a[k + 1]) {
        c = 1;
        break;
      }
    }
    if (c == 1)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
