#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    int temp[n];
    for (int i = 0; i < n; i++) temp[i] = arr[i];
    int p[m];
    for (int i = 0; i < m; i++) cin >> p[i];
    sort(p, p + m);
    for (int i = 0; i < m; i++) {
      if (i < m - 1 && p[i] + 1 == p[i + 1]) {
        int j = i;
        while (j < m - 1 && p[j] + 1 == p[j + 1]) j++;
        sort(arr + p[i] - 1, arr + p[j] + 1);
        i = j;
      } else
        sort(arr + p[i] - 1, arr + p[i] + 1);
    }
    sort(temp, temp + n);
    int f = 0;
    for (int i = 0; i < n; i++) {
      if (arr[i] != temp[i]) {
        cout << "NO";
        f = 1;
        break;
      }
    }
    if (!f) cout << "YES";
    cout << endl;
  }
  return 0;
}
