#include <bits/stdc++.h>
using namespace std;
const int N = 105;
void solve() {
  int n, m;
  cin >> n >> m;
  int a[N], p[N], mark[N];
  memset(mark, 0, sizeof(mark));
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> p[i];
    mark[p[i]] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j + 1 <= n; j++) {
      if (mark[j] && a[j] > a[j + 1]) swap(a[j], a[j + 1]);
    }
  }
  int sorted = 1;
  for (int i = 1; i + 1 <= n; i++) sorted &= (a[i] <= a[i + 1]);
  if (!sorted) {
    cout << "NO"
         << "\n";
  } else {
    cout << "YES"
         << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
