#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
void solve() {
  long long n, m;
  cin >> n >> m;
  vector<long long> a(n + 1), b(m + 1), mark(n + 1, 0);
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= m; i++) {
    cin >> b[i];
    mark[b[i]] = 1;
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j < n; j++) {
      if (mark[j] && a[j] > a[j + 1]) swap(a[j], a[j + 1]);
    }
  }
  long long sorted = 1;
  for (long long i = 1; i < n; i++) {
    if (a[i] > a[i + 1]) sorted = 0;
  }
  if (sorted)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
