#include <bits/stdc++.h>
using namespace std;
int t, n, m;
int p[201], a[201], fr[201];
vector<int> v;
int main() {
  cin >> t;
  while (t > 0) {
    t--;
    int ok = 1;
    cin >> n >> m;
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 1; i <= m; i++) cin >> p[i];
    sort(p + 1, p + m + 1);
    int st = -1;
    int dr = -1;
    p[m + 1] = -1;
    a[n + 1] = 10000;
    a[0] = -1;
    for (int i = 2; i <= m + 1; i++)
      if (p[i] == p[i - 1] + 1) {
        if (st == -1) st = p[i - 1];
      } else if (st != -1) {
        dr = p[i - 1] + 1;
        int mi = 1000000;
        int ma = -1;
        for (int j = st; j <= dr; j++) {
          fr[j] = 1;
          ma = max(ma, a[j]);
          mi = min(mi, a[j]);
        }
        a[st] = mi;
        a[dr] = ma;
        if (ma > a[dr + 1] || mi < a[st - 1]) ok = 0;
        st = -1;
        dr = -1;
      } else {
        int poz = p[i - 1];
        fr[poz] = 1;
        fr[poz + 1] = 1;
        if (a[poz] > a[poz + 1]) swap(a[poz], a[poz + 1]);
        if (a[poz] < a[poz - 1] || a[poz + 1] > a[poz + 2]) ok = 0;
      }
    for (int i = 1; i <= n; i++)
      if (fr[i] == 0) v.push_back(a[i]);
    for (int i = 1; i < v.size(); i++)
      if (v[i] < v[i - 1]) ok = 0;
    v.clear();
    for (int i = 1; i <= n; i++) fr[i] = 0;
    if (ok == 0)
      cout << "NO" << '\n';
    else
      cout << "YES" << '\n';
  }
  return 0;
}
