#include <bits/stdc++.h>
using namespace std;
int main() {
  int tests, n, m;
  int *arr, *p, temp;
  cin >> tests;
  while (tests--) {
    cin >> n >> m;
    arr = new int[n];
    unordered_set<int> p;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    for (int i = 0; i < m; i++) {
      cin >> temp;
      p.insert(temp);
    }
    bool flag = true;
    for (int i = 0; i < n - 1 && flag == true; i++) {
      for (int j = 0; j < n - i - 1; j++) {
        if (arr[j + 1] < arr[j]) {
          temp = arr[j];
          arr[j] = arr[j + 1];
          arr[j + 1] = temp;
          if (p.find(j + 1) == p.end()) {
            flag = false;
            cout << "NO" << endl;
            break;
          }
        }
      }
    }
    if (flag == true) {
      cout << "YES" << endl;
    }
    free(arr);
  }
  return 0;
}
