#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, d, i, j, k, l;
    vector<long long> v, x, y;
    cin >> a >> c;
    for (i = 1; i <= a; i++) {
      cin >> b;
      v.push_back(b);
    }
    for (i = 1; i <= c; i++) {
      cin >> b;
      x.push_back(b - 1);
    }
  xx:
    k = 0;
    for (i = 0; i < x.size(); i++) {
      if (x[i] + 1 < a) {
        if (v[x[i]] > v[x[i] + 1]) {
          k = 1;
          swap(v[x[i]], v[x[i] + 1]);
        }
      }
    }
    if (k == 1) goto xx;
    k = 0;
    for (i = 0; i + 1 < v.size(); i++) {
      if (v[i] > v[i + 1]) k = 1;
    }
    if (k == 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
