#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  long long t;
  cin >> t;
  while (t--) solve(), cout << endl;
  return 0;
}
void solve() {
  int n, m;
  cin >> n >> m;
  int a[n], b[m], c[n], i, flag = 1;
  for (i = 0; i < n; i++) cin >> a[i], c[i] = a[i];
  sort(c, c + n);
  for (i = 0; i < m; i++) cin >> b[i], b[i]--;
  sort(b, b + m);
  int ini = b[0], fin = b[0] + 1;
  for (i = 0; i < m; i++) {
    if (i != m - 1 && b[i + 1] == b[i] + 1) {
      fin++;
      continue;
    } else
      sort(a + ini, a + fin + 1), ini = b[i + 1], fin = b[i + 1] + 1;
  }
  for (i = 0; i < n; i++) {
    if (a[i] != c[i]) {
      flag = 0;
      break;
    }
  }
  if (flag == 0)
    cout << "NO";
  else
    cout << "YES";
}
