#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long res = 1ll;
  while (b > 0) {
    if (b % 2 != 0) res = (res * a) % 1000000007;
    a = (a * a) % 1000000007;
    b /= 2;
  }
  return res;
}
long long ncr(long long n, long long k) {
  if (k > n - k) k = n - k;
  long long pro = 1;
  for (long long i = 0; i < k; i++) {
    pro = (pro * (n - i)) % 1000000007;
    pro /= (i + 1);
  }
  return (pro % 1000000007);
}
vector<long long> prime;
void seive() {
  vector<bool> isprime(2000001, true);
  for (int i = 2; i * i <= 2000000; i++) {
    if (isprime[i]) {
      for (int j = i * i; j <= 2000000; j += i) {
        isprime[j] = false;
      }
    }
  }
  for (int i = 2; i <= 1000000; i++) {
    if (isprime[i]) prime.push_back(i);
  }
}
void swap(long long *a, long long *b) {
  long long temp = *a;
  *a = *b;
  *b = temp;
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, a, b, n, m;
  cin >> t;
  while (t--) {
    cin >> n >> m;
    vector<long long> arr1(n);
    set<long long> s;
    for (int i = 0; i < n; i++) cin >> arr1[i];
    for (int i = 0; i < m; i++) {
      cin >> a;
      s.insert(a - 1);
    }
    while (1) {
      int flag = 0;
      for (int j = 0; j < n; j++) {
        if (s.find(j) != s.end() && arr1[j] > arr1[j + 1]) {
          flag = 1;
          swap(&arr1[j], &arr1[j + 1]);
        }
      }
      if (!flag) break;
    }
    int flag = 0;
    for (int i = 0; i < n - 1; i++) {
      if (arr1[i] > arr1[i + 1]) {
        flag = 1;
        break;
      }
    }
    if (flag)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
