#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tc;
  cin >> tc;
  while (tc--) {
    int n, m;
    cin >> n >> m;
    int a[n], b[m];
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= m; i++) {
      cin >> b[i];
    }
    int ok = 0;
    for (int i = 1; i < n; i++) {
      if (a[i] <= a[i + 1]) {
        ok++;
      }
    }
    if (ok == n - 1) {
      cout << "YES"
           << "\n";
      continue;
    }
    for (int j = 1; j <= m; j++) {
      for (int k = 1; k <= m; k++) {
        if (a[b[k]] > a[b[k] + 1]) swap(a[b[k]], a[b[k] + 1]);
      }
    }
    bool t = true;
    for (int i = 1; i < n; i++) {
      if (a[i] > a[i + 1]) {
        t = false;
      }
    }
    if (t) {
      cout << "YES"
           << "\n";
    } else {
      cout << "NO"
           << "\n";
    }
  }
  return 0;
}
