#include <bits/stdc++.h>
using namespace std;
double const pi = 3.1415926536;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n, m;
    cin >> n >> m;
    int a[n], p[m], b[n];
    for (int j = 0; j < n; j++) {
      cin >> a[j];
      b[j] = a[j];
    }
    sort(b, b + n);
    for (int j = 0; j < m; j++) cin >> p[j];
    int f = 0;
    for (int j = 0; j < n; j++) {
      int t = 0;
      for (int k = 0; k < m; k++) {
        if (p[k] == j + 1) {
          t = 1;
        }
      }
      if (t == 1) {
        if (a[j] > a[j + 1]) {
          swap(a[j], a[j + 1]);
          j = -1;
        }
      }
    }
    for (int j = 0; j < n; j++) {
      if (a[j] != b[j]) {
        cout << "NO\n";
        f = 1;
        break;
      }
    }
    if (f == 0) cout << "YES\n";
  }
}
