#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int INF = INT_MAX;
const int mod = 1e9 + 7;
const int N = 2e5 + 10;
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline int mul(int x, int y) {
  x = (1LL * x * y) % mod;
  return x;
}
clock_t time_p = clock();
vector<int> g[N];
int vis[N];
int comp[N];
int cc;
void dfs(int u) {
  vis[u] = 1;
  comp[u] = cc;
  for (auto x : g[u]) {
    if (!vis[x]) {
      dfs(x);
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    memset(vis, 0, sizeof(vis));
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; ++i) g[i].clear();
    vector<int> a(n), p(m);
    for (int i = 0; i <= n - 1; ++i) cin >> a[i];
    for (int i = 0; i <= m - 1; ++i) cin >> p[i];
    for (int i = 0; i <= m - 1; ++i) {
      g[p[i]].push_back(p[i] + 1);
      g[p[i] + 1].push_back(p[i]);
    }
    cc = 1;
    for (int i = 1; i <= n; ++i) {
      if (!vis[i]) dfs(i);
      cc++;
    }
    int ff = 1;
    for (int i = 1; i <= n; ++i) {
      for (int j = i + 1; j <= n; ++j) {
        if (a[j - 1] < a[i - 1]) {
          if (comp[j] != comp[i]) ff = 0;
        }
      }
    }
    if (ff)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  time_p = clock() - time_p;
  cerr << "\nTime Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
  return 0;
}
