#include <bits/stdc++.h>
using namespace std;
int main() {
  int T = 1, cs = 1;
  scanf("%d", &T);
  while (T--) {
    int n, m;
    cin >> n >> m;
    int a[n + 1], p[m + 1];
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) cin >> p[i];
    sort(p, p + m);
    int start = p[0];
    for (int i = 1; i < m; i++) {
      if (p[i] - p[i - 1] == 1)
        continue;
      else {
        sort(a + start - 1, a + p[i - 1] + 1);
        start = p[i];
      }
    }
    sort(a + start - 1, a + p[m - 1] + 1);
    int flag = 1;
    for (int i = 1; i < n; i++) {
      if (a[i] < a[i - 1]) {
        flag = 0;
        break;
      }
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
