#include <bits/stdc++.h>
using namespace std;
int t, n, m;
int a[100];
bool p[100];
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> m;
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
      p[i] = false;
    }
    for (int i = 0; i < m; ++i) {
      int r;
      cin >> r;
      r--;
      p[r] = true;
    }
    int x = 0;
    int y = 0;
    bool bad = false;
    for (int i = 0; i < n; ++i) {
      y = max(y, a[i]);
      if (a[i] < x) bad = true;
      if (p[i]) continue;
      x = y;
    }
    if (bad)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
