#include <bits/stdc++.h>
using namespace std;
int arr[1000000], p[1000000];
int main() {
  int t;
  cin >> t;
  for (int o = 0; o < t; o++) {
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; i++) cin >> arr[i];
    set<int> si;
    for (int i = 0; i < m; i++) {
      cin >> p[i];
      si.insert(p[i]);
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n - 1; j++) {
        if (arr[j] > arr[j + 1] && si.find(j) != si.end())
          swap(arr[j], arr[j + 1]);
      }
    }
    bool is = true;
    for (int i = 1; i <= n - 1; i++) {
      if (arr[i] > arr[i + 1]) is = false;
    }
    if (is)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
