#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int n, m, t;
    cin >> n >> m;
    std::vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    std::vector<bool> p(n);
    while (m--) {
      cin >> t;
      p[t - 1] = true;
    }
    while (1) {
      int flag = 0;
      for (int i = 0; i < n - 1; i++) {
        if (p[i] && a[i] > a[i + 1]) {
          swap(a[i], a[i + 1]);
          flag = 1;
        }
      }
      if (!flag) break;
    }
    for (int i = 0; i < n - 1; i++)
      if (a[i] > a[i + 1]) {
        cout << "NO";
        goto flag;
      }
    cout << "YES";
  flag:
    cout << endl;
  }
}
