#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m, temp;
    cin >> n >> m;
    map<long long int, long long int> num, pos;
    for (long long int i = 0; i < n; i += 1) {
      cin >> temp;
      num[i + 1] = temp;
    }
    set<long long int> s;
    for (long long int i = 0; i < m; i += 1) {
      cin >> temp;
      s.insert(temp);
    }
    long long int jok = 0;
    set<long long int>::iterator it = s.begin(), it2;
    while (jok == 0) {
      jok = 1;
      it = s.begin();
      while (it != s.end()) {
        if (*it == n) break;
        if (num[*it] > num[*it + 1]) {
          swap(num[*it], num[*it + 1]);
          jok = 0;
        }
        it++;
      }
    }
    jok = 0;
    for (long long int i = 1; i < n; i += 1) {
      if (num[i] > num[i + 1]) {
        jok = 1;
        break;
      }
    }
    if (jok == 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
