#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const int mod = 1e9 + 7;
const int M = 1e8;
const int N = 1e6 + 5;
int n, m;
int a[N];
map<int, int> mp;
void solve() {
  mp.clear();
  cin >> n >> m;
  for (register int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (register int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    mp[x] = 1;
  }
  for (register int j = 1; j <= n; j++)
    for (register int i = 1; i < n; i++)
      if (a[i + 1] < a[i])
        if (mp[i]) swap(a[i], a[i + 1]);
  for (register int i = 1; i < n; i++)
    if (a[i + 1] < a[i]) {
      puts("NO");
      return;
    }
  puts("YES");
}
signed main() {
  int T = 1;
  cin >> T;
  for (int index = 1; index <= T; index++) {
    solve();
  }
  return 0;
}
