#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  vector<long long> v;
  vector<long long> v2;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    long long a[n + 1], p[m + 1], copya[n + 1];
    for (int i = 1; i <= n; ++i) {
      cin >> a[i];
    }
    for (int i = 1; i <= m; ++i) {
      cin >> p[i];
    }
    for (int l = 1; l <= n; ++l) {
      for (int j = 1; j <= m; ++j) {
        if (a[p[j]] > a[p[j] + 1]) swap(a[p[j]], a[p[j] + 1]);
      }
    }
    bool flag = false;
    for (int k = 2; k <= n; ++k) {
      if (a[k - 1] > a[k]) flag = true;
    }
    if (!flag)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
