#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int n, m, i, j, temp, flag = 0;
    cin >> n >> m;
    int a[n], b[m];
    map<long long int, long long int> mp;
    for (i = 0; i < n; i++) cin >> a[i];
    for (i = 0; i < m; i++) {
      cin >> b[i];
      mp[b[i]]++;
    }
    for (i = 1; i < n; i++) {
      if (flag == 1) break;
      j = i;
      while (a[j] < a[j - 1] && j >= 1) {
        if (mp[j] == 0) {
          flag = 1;
          break;
        }
        temp = a[j];
        a[j] = a[j - 1];
        a[j - 1] = temp;
        j--;
      }
    }
    if (flag == 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
