#include <bits/stdc++.h>
using namespace std;
long long t, n, m, a[1005000], x;
map<long long, bool> check;
void solve() {
  cin >> n >> m;
  check.clear();
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) cin >> x, check[x] = 1;
  for (int i = 1; i < n; i++) {
    for (int j = n; j > i; j--) {
      if (a[j] < a[j - 1]) {
        if (check[j - 1])
          swap(a[j], a[j - 1]);
        else {
          cout << "NO\n";
          return;
        }
      }
    }
  }
  cout << "YES\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) solve();
  return 0;
}
