#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, a[100];
    bool p[100];
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    fill(p, p + sizeof(p), false);
    for (int i = 0; i < m; i++) {
      int temp;
      cin >> temp;
      temp--;
      p[temp] = true;
    }
    bool changed = true;
    while (changed) {
      changed = false;
      for (int i = 0; i < n; i++) {
        if (p[i] && i + 1 < n && a[i] > a[i + 1]) {
          int temp = a[i + 1];
          a[i + 1] = a[i];
          a[i] = temp;
          changed = true;
        }
      }
    }
    bool flag = false;
    for (int i = 0; i < n; i++) {
      if (i + 1 < n && a[i] > a[i + 1]) {
        cout << "NO" << endl;
        flag = true;
        break;
      }
    }
    if (!flag) cout << "YES" << endl;
  }
}
