#include <bits/stdc++.h>
using namespace std;
int a[105];
int t, n, m;
bool check() {
  int flag = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i + 1]) return 0;
  }
  return 1;
}
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> m;
    for (int i = 1; i <= n; i++) cin >> a[i];
    set<int> s;
    int x;
    for (int i = 1; i <= m; i++) {
      cin >> x;
      s.insert(x);
    }
    int flag = 1;
    while (1) {
      if (check()) break;
      for (int i = 1; i < n; i++) {
        if (a[i] > a[i + 1]) {
          set<int>::iterator it = s.lower_bound(i);
          if (*it != i) {
            flag = 0;
            break;
          }
          swap(a[i], a[i + 1]);
        }
      }
      if (flag == 0) break;
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
