#include <bits/stdc++.h>
using namespace std;
const long long INF = 2000000000000000000LL;
const int inf = 0x3f3f3f3f;
const long double EPS = 1e-9;
bool mark[150];
vector<pair<int, int> > v;
vector<int> a, b;
bool cmp(pair<int, int> x, pair<int, int> y) {
  if (x.first >= y.first) return true;
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    memset(mark, false, sizeof mark);
    a.clear();
    int n, m;
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      a.push_back(x);
    }
    for (int i = 0; i < m; i++) {
      int x;
      cin >> x;
      mark[x - 1] = true;
    }
    int t = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n - 1; j++) {
        if (a[j] > a[j + 1] && mark[j]) swap(a[j], a[j + 1]);
      }
    }
    for (int i = 1; i < n; i++) {
      if (a[i] < a[i - 1]) {
        t = 1;
        break;
      }
    }
    if (t)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
