#include <bits/stdc++.h>
using namespace std;
struct duo {
  long long x;
  long long pos;
};
bool cmp(duo a, duo b) { return (a.x < b.x); }
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    long long a[n];
    long long f[n];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      f[i] = a[i];
    }
    long long b[m];
    for (long long i = 0; i < m; i++) {
      cin >> b[i];
    }
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < m; j++) {
        long long r = b[j] - 1;
        if (a[r] > a[r + 1]) {
          long long temp = a[r + 1];
          a[r + 1] = a[r];
          a[r] = temp;
        }
      }
    }
    sort(f, f + n);
    long long ans = 1;
    for (long long i = 0; i < n; i++) {
      if (a[i] != f[i]) {
        ans = 0;
        break;
      }
    }
    if (ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
