#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.setf(ios::fixed);
  cout.precision(20);
  long long int t, n, m;
  cin >> t;
  while (t--) {
    cin >> n >> m;
    long long int a[n + 1], b[n + 1], p[m + 1];
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= m; i++) {
      cin >> p[i];
    }
    for (int i = 1; i <= n; i++) {
      b[i] = a[i];
    }
    sort(b + 1, b + n + 1);
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        if (a[p[j]] > a[p[j] + 1]) swap(a[p[j]], a[p[j] + 1]);
      }
    }
    int flag = 1;
    for (int i = 1; i <= n; i++) {
      if (a[i] != b[i]) {
        flag = 0;
        break;
      }
    }
    if (flag == 1)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
}
