#include <bits/stdc++.h>
using namespace std;
void dfs(vector<int> adj[], int i, vector<bool> &vi) {
  if (vi[i]) return;
  vi[i] = true;
  for (auto j : adj[i])
    if (!vi[j]) dfs(adj, j, vi);
}
void solution() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n), p(n, 0);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (long long i = 0; i < m; ++i) {
    int u;
    cin >> u;
    p[u - 1] = 1;
  }
  bool f = 0;
  for (int i = 0; i < n; i++) {
    int j = i;
    if (p[i] == 0) continue;
    while (j < n && p[j]) j++;
    sort(a.begin() + i, a.begin() + j + 1);
    i = j;
  }
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      cout << "NO"
           << "\n";
      return;
    }
  }
  cout << "YES"
       << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solution();
  }
  return 0;
}
