#include <bits/stdc++.h>
using namespace std;
template <typename T, typename T1>
T amax(T &a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T &a, T1 b) {
  if (b < a) a = b;
  return a;
}
const int mod = 1000000000 + 7;
const int N = 1000000 + 6;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tc;
  cin >> tc;
  while (tc--) {
    int n, m;
    cin >> n >> m;
    int a[n], p[n];
    memset(p, 0, sizeof(p));
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) {
      int t;
      cin >> t;
      p[t - 1] = 1;
    }
    bool bo = 1;
    for (int x = 0; x < n; x++) {
      if (!bo) break;
      for (int i = 0; i < n - 1; i++) {
        if (a[i] > a[i + 1]) {
          if (p[i])
            swap(a[i], a[i + 1]);
          else {
            bo = 0;
            break;
          }
        }
      }
    }
    if (bo)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
