#include <bits/stdc++.h>
using namespace std;
int a[105], p[105], t, n, m, min;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int f = 0;
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < m; i++) {
      cin >> p[i];
    }
    for (int i = 0; i < n - 1; i++) {
      for (int j = n - 1; j >= 1; j--) {
        if (a[j] < a[j - 1]) {
          int x = j - 1;
          int k;
          for (k = 0; k < m; k++) {
            if (p[k] == x + 1) {
              t = a[j - 1];
              a[j - 1] = a[j];
              a[j] = t;
              break;
            }
          }
          if (k == m) {
            f = 1;
            break;
          }
        }
      }
    }
    if (f == 1)
      cout << "NO" << '\n';
    else
      cout << "YES" << '\n';
  }
  return 0;
}
