#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    vector<long long> a(n), p(m);
    for (long long i = 0; i < n; i++) cin >> a[i];
    for (long long i = 0; i < m; i++) cin >> p[i], p[i]--;
    for (long long d = 0; d <= (long long)1e5; d++) {
      for (long long i = 0; i < m; i++) {
        if (a[p[i]] > a[p[i] + 1]) swap(a[p[i]], a[p[i] + 1]);
      }
    }
    bool ok = true;
    for (long long i = 0; i < n - 1; i++) ok &= (a[i] <= a[i + 1]);
    if (ok)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
}
