#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 3;
const int M = 1e8;
long long int powM(long long int b, int p) {
  long long int r = 1;
  for (; p; b = b * b % M, p /= 2)
    if (p & 1) r = r * b % M;
  return r;
}
vector<int> fact(int n) {
  vector<int> v;
  for (int i = 1; i <= sqrt(n); ++i) {
    if (n % i == 0) {
      v.push_back(i);
      if (i * i != n) v.push_back(n / i);
    }
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  return v;
}
long long int div(long long int n) {
  int d[1000001] = {0};
  for (int i = 1; i <= 1000000; i++)
    for (int j = i; j <= 1000000; j += i) d[j]++;
  return d[n];
}
long long int dist(pair<long long int, long long int> a,
                   pair<long long int, long long int> b) {
  return (a.first - b.first) * (a.first - b.first) +
         (a.second - b.second) * (a.second - b.second);
}
void solve() {
  int n, m;
  cin >> n >> m;
  int a[n];
  int x, j = 0;
  set<int> p;
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < m; ++i) cin >> x, p.insert(x);
  for (int i = 1; i <= n; ++i)
    if (!p.count(i)) sort(a + j, a + i), j = i;
  if (is_sorted(a, a + n))
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) solve(), cout << "\n";
  return 0;
}
