#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    bool ans = 1;
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    vector<bool> p(n, 0);
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) {
      int x;
      cin >> x;
      p[x - 1] = 1;
    }
    for (int j = 0; j < n; j++) {
      for (int i = 0; i < n - 1; i++) {
        if (a[i] > a[i + 1]) {
          if (p[i])
            swap(a[i], a[i + 1]);
          else
            ans = 0;
        }
      }
    }
    if (ans)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
