#include <bits/stdc++.h>
using namespace std;
int t, n, m;
set<int> s;
pair<int, int> arr[101];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> t;
  while (t--) {
    cin >> n >> m;
    for (int i = 1; i <= n; i++) {
      cin >> arr[i].first;
      arr[i].second = i;
    }
    for (int i = 1; i <= m; i++) {
      int x;
      cin >> x;
      s.insert(x);
    }
    sort(arr + 1, arr + n + 1);
    bool works = true;
    for (int i = 1; i <= n; i++) {
      for (int j = i; j < arr[i].second; j++) {
        if (s.find(j) == s.end()) {
          works = false;
        }
      }
    }
    if (works)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
    s.clear();
  }
}
