#include <bits/stdc++.h>
using namespace std;
const int N = 205, M = 1000000007, BIG = 0x3f3f3f3f;
int ct = 0;
int m, n;
int a[N], p[N];
bool Read() {
  cin >> n;
  if (cin.eof()) return 0;
  cin >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) cin >> p[i];
  return 1;
}
void Process() {
  for (int i = 0; i < 10005; i++)
    for (int j = 1; j <= m; j++)
      if (a[p[j]] > a[p[j] + 1]) swap(a[p[j]], a[p[j] + 1]);
  for (int i = 1; i < n; i++)
    if (a[i] > a[i + 1]) {
      cout << "NO\n";
      return;
    }
  cout << "YES\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T-- && Read()) Process();
  return 0;
}
