#include <bits/stdc++.h>
using namespace std;
int t, m, n, a[123], aux, swapos[123];
bool ans = true;
int main() {
  cin >> t;
  while (t--) {
    ans = true;
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    memset(swapos, -1, sizeof swapos);
    for (int i = 0; i < m; i++) {
      cin >> aux;
      swapos[aux - 1]++;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n - 1; j++) {
        if (a[j] > a[j + 1]) {
          swap(a[j], a[j + 1]);
          if (swapos[j] == -1) {
            ans = false;
          }
        }
      }
    }
    if (ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
