#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, m, flag = 1;
    cin >> n >> m;
    int b = n;
    vector<int> v;
    int a[n];
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 0; i < m; i++) {
      int temp;
      cin >> temp;
      v.push_back(temp);
    }
    while (b-- > 0 && flag) {
      for (int i = 1; i < n; i++) {
        if (a[i] > a[i + 1]) {
          auto it = std::find(v.begin(), v.end(), i);
          if (it != v.end())
            swap(a[i], a[i + 1]);
          else {
            cout << "NO\n";
            flag = 0;
            break;
          }
        }
      }
    }
    if (flag == 1) {
      printf("YES\n");
    }
  }
}
