#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int n, m;
    cin >> n >> m;
    int arr[1010];
    for (int i = 1; i <= n; i++) {
      cin >> arr[i];
    }
    int abb[1010];
    for (int i = 0; i < m; i++) {
      cin >> abb[i];
    }
    sort(abb, abb + m);
    int acc[1010];
    while (1) {
      for (int i = 1; i <= n; i++) {
        acc[i] = arr[i];
      }
      for (int i = m - 1; i >= 0; i--) {
        int a = abb[i];
        if (arr[a] > arr[a + 1]) {
          swap(arr[a], arr[a + 1]);
        }
      }
      bool ef = false;
      for (int i = 1; i <= n; i++) {
        if (acc[i] != arr[i]) {
          ef = true;
          break;
        }
      }
      if (!ef) {
        break;
      }
    }
    bool gf = false;
    for (int i = 1; i < n; i++) {
      if (arr[i] > arr[i + 1]) gf = true;
    }
    if (gf)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
