#include <bits/stdc++.h>
using namespace std;
const long long N = 100 + 5;
long long a[N], p[N], mark[N];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    memset(mark, 0, sizeof(mark));
    long long n, m;
    cin >> n >> m;
    for (long long i = 1; i <= n; i++) cin >> a[i];
    for (long long i = 1; i <= m; i++) {
      cin >> p[i];
      mark[p[i]] = 1;
    }
    for (long long i = 1; i <= n; i++) {
      for (long long j = 1; j + 1 <= n; j++) {
        if (mark[j] && a[j] > a[j + 1]) swap(a[j], a[j + 1]);
      }
    }
    bool check = true;
    for (long long i = 1; i + 1 <= n; i++) check &= (a[i] <= a[i + 1]);
    if (check)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
