#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    vector<int> a(n + 1, 0);
    vector<int> p(m, 0);
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) cin >> p[i];
    vector<int> sorted = a;
    sort(sorted.begin(), sorted.end());
    set<int> pos(p.begin(), p.end());
    bool flag = true;
    for (int i = 1; i <= n; i++) {
      if (a[i] != sorted[i]) {
        if (!pos.count(i))
          flag = false;
        else {
          int now = i;
          while (pos.count(now) && a[now] != sorted[i]) now++;
          if (a[now] == sorted[i]) {
            swap(a[i], a[now]);
          } else {
            flag = false;
          }
        }
      }
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
