#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, p;
    cin >> n >> p;
    long long arr[n];
    for (long long i = 0; i < n; i++) cin >> arr[i];
    long long srt[n];
    memset(srt, 0, sizeof srt);
    long long prr[p];
    for (long long i = 0; i < p; i++) {
      cin >> prr[i];
      srt[prr[i] - 1] = 1;
    }
    long long idx = 0;
    while (idx < n) {
      long long st = idx, ls = idx;
      while (ls < n && srt[ls] == 1) ls++;
      sort(arr + st, arr + ls + 1);
      idx = ls + 1;
    }
    bool pos = true;
    for (long long i = 1; i < n; i++)
      if (arr[i] < arr[i - 1]) pos = false;
    if (pos)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
