#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int z = 0; z < t; z++) {
    int n, m;
    cin >> n >> m;
    vector<int> arr(n);
    for (int i = 0; i < n; i++) cin >> arr[i];
    int visit[n];
    memset(visit, 0, sizeof(visit));
    for (int i = 0; i < m; i++) {
      int p;
      cin >> p;
      visit[p - 1] = 1;
    }
    int x = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n - 1; j++) {
        if (arr[j] > arr[j + 1]) {
          swap(arr[j], arr[j + 1]);
          if (visit[j] == 0) {
            cout << "NO" << endl;
            x = 1;
            break;
          }
        }
        if (i == n - 1 && j == n - 2) cout << "YES" << endl;
      }
      if (x) break;
    }
  }
  return 0;
}
