#include <bits/stdc++.h>
using namespace std;
string solve() {
  int n, m;
  cin >> n >> m;
  vector<int> arr(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  set<int> swaps;
  for (int i = 0, x; i < m; i++) {
    cin >> x;
    swaps.insert(x);
  }
  bool cool = true;
  while (cool) {
    cool = false;
    for (int i = 1; i < n; i++) {
      if (arr[i] > arr[i + 1]) {
        if (swaps.count(i)) {
          swap(arr[i], arr[i + 1]);
          cool = true;
        } else
          return "No";
      }
    }
    if (!cool) return "Yes";
  }
}
int main() {
  int tc = 1;
  cin >> tc;
  while (tc--) {
    cout << solve() << endl;
  }
  return 0;
}
