#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int a[n], b[m];
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) cin >> b[i];
    int i = 0, k1, k2;
    sort(b, b + m);
    while (i < m) {
      k1 = b[i];
      k2 = k1;
      while (i < m - 1 && b[i + 1] - b[i] == 1) {
        i++;
      }
      k2 = b[i];
      sort(a + k1 - 1, a + k2 + 1);
      i++;
    }
    bool ans = true;
    for (int i = 0; i < n - 1; i++)
      if (a[i + 1] < a[i]) {
        ans = false;
        break;
      }
    if (ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
