#include <bits/stdc++.h>
using namespace std;
int arr[105];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    bool can = true;
    cin >> n >> m;
    int pos[m];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    for (int i = 0; i < m; i++) {
      cin >> pos[i];
    }
    while (!is_sorted(arr, arr + n) && can) {
      for (int i = 0; i < n - 1; i++) {
        if (arr[i] > arr[i + 1]) {
          bool able = false;
          for (int j = 0; j < m; j++) {
            if (i + 1 == pos[j]) {
              able = true;
              break;
            }
          }
          if (able) {
            swap(arr[i], arr[i + 1]);
          } else {
            can = false;
            break;
          }
        }
      }
    }
    if (can) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
