#include <bits/stdc++.h>
using namespace std;
template <typename T>
T ceil(T x, T n) {
  T ans = 0;
  ans = x / n;
  if (x % n) ans++;
  return ans;
}
template <typename P>
P Lcm(P a, P b) {
  return (a * b) / __gcd(a, b);
}
template <typename G>
void swap(G *a, G *b) {
  long long temp = a;
  a = b;
  b = a;
}
template <typename T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int a[101]{0};
    int b[101]{0};
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) {
      int x;
      cin >> x;
      b[x]++;
    }
    int flag = 1;
    while (flag) {
      flag = 0;
      for (int i = 1; i <= n - 1; i++) {
        if (a[i] > a[i + 1] and b[i]) {
          flag = 1;
          int temp = a[i];
          a[i] = a[i + 1];
          a[i + 1] = temp;
        }
      }
    }
    bool chk = true;
    for (int i = 1; i < n; i++)
      if (a[i] > a[i + 1]) {
        chk = false;
        break;
      }
    if (chk)
      cout << "YES";
    else
      cout << "NO";
    cout << "\n";
  }
  return 0;
}
