#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int lol[n];
    for (int i = 0; i < n; i++) cin >> lol[i];
    int mn[m];
    for (int i = 0; i < m; i++) cin >> mn[i];
    sort(mn, mn + m);
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (lol[mn[j]] < lol[mn[j] - 1]) swap(lol[mn[j]], lol[mn[j] - 1]);
      }
    }
    if (is_sorted(lol, lol + n))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
