#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {
  if (*it == "") {
  }
}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\n";
  err(++it, args...);
}
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;
const int INF = 0x3f3f3f3f;
int main(void) {
  int t, n, p;
  int able;
  vector<string> ans;
  cin >> t;
  while (t--) {
    cin >> n >> p;
    int arr[n], pos[p], test[n];
    able = p;
    for (long long i = 0, ggd = n; i < ggd; i++) {
      cin >> arr[i];
      test[i] = arr[i];
    }
    for (long long j = 0, ggd = p; j < ggd; j++) {
      cin >> pos[j];
      pos[j]--;
    }
    sort(test, test + n);
    while (able--) {
      for (int i = (p - 1); i >= 0; i--) {
        if (pos[i] < n - 1) {
          if (arr[pos[i]] > arr[pos[i] + 1]) {
            swap(arr[pos[i]], arr[pos[i] + 1]);
            able++;
          }
        }
      }
    }
    able = 0;
    for (int j = 0; j < n; j++) {
      if (arr[j] != test[j]) {
        able++;
      }
    }
    if (able) {
      ans.push_back("NO");
    } else {
      ans.push_back("YES");
    }
  }
  for (unsigned int i = 0; i < ans.size(); i++) {
    cout << ans[i] << '\n';
  }
  return 0;
}
