#include <bits/stdc++.h>
using namespace std;
void swap(long long* a, long long* b) {
  long long c = *a;
  *a = *b;
  *b = c;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    long long a[n + 1];
    bool h[101] = {};
    for (long long i = 1; i <= n; ++i) cin >> a[i];
    for (long long j = 0; j < m; ++j) {
      long long temp;
      cin >> temp;
      h[temp] = 1;
    }
    for (long long i = 1; i <= n; ++i) {
      for (long long j = 1; j <= n; ++j) {
        if (a[j] > a[j + 1] && j != n) {
          swap(&a[j], &a[j + 1]);
          if (!h[j]) {
            cout << "NO\n";
            goto go;
          }
        }
      }
    }
    cout << "YES\n";
  go:;
  }
}
