#include <bits/stdc++.h>
using namespace std;
void swap(int *a, int *b) {
  int temp = *a;
  *a = *b;
  *b = temp;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int arr[n];
    set<int> s;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    for (int i = 0; i < m; i++) {
      int x;
      cin >> x;
      s.insert(x);
    }
    int flag = 0;
    for (int i = 0; i < n - 1; i++) {
      for (int j = 0; j < n - 1 - i; j++) {
        if (arr[j] > arr[j + 1]) {
          if (s.find(j + 1) == s.end()) {
            flag = 1;
            break;
          }
          swap(&arr[j], &arr[j + 1]);
        }
      }
      if (flag == 1) break;
    }
    if (flag == 1)
      cout << "NO"
           << "\n";
    else
      cout << "YES"
           << "\n";
  }
  return 0;
}
