#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    bool flag = true;
    int n, m;
    cin >> n >> m;
    int arr[n + 1], arr2[m + 1];
    for (int i = 1; i <= n; i++) cin >> arr[i];
    for (int i = 1; i <= m; i++) cin >> arr2[i];
    sort(arr2 + 1, arr2 + m + 1);
    for (int i = m; i >= 1; i--) {
      for (int j = 1; j <= i; j++) {
        if (arr[arr2[j]] > arr[arr2[j] + 1])
          swap(arr[arr2[j]], arr[arr2[j] + 1]);
      }
    }
    for (long long i = 1; i <= n - 1; i++) {
      if (arr[i] > arr[i + 1]) {
        cout << "NO" << endl;
        flag = false;
        break;
      }
    }
    if (flag) cout << "YES" << endl;
  }
  return 0;
}
