#include <bits/stdc++.h>
using namespace std;
long long __gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return __gcd(b, a);
}
void print_set(vector<int> a) {
  for (int i : a) {
    cout << i << " ";
  }
  cout << "\n";
}
bool valid(vector<int> a) {
  for (int i = 1; i < a.size(); i++) {
    if (a[i - 1] <= a[i]) {
      continue;
    }
    return false;
  }
  return true;
}
bool valid_1(vector<int> a) {
  bool flag = false;
  for (int i = 1; i < a.size(); i++) {
    if (a[i - 1] <= a[i]) {
      flag = true;
    } else {
      flag = false;
      break;
    }
  }
  return flag;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int m, n;
    cin >> n >> m;
    vector<int> a;
    map<int, int> mp;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      a.push_back(x);
    }
    for (int j = 0; j < m; j++) {
      int y;
      cin >> y;
      y--;
      mp[y] = 0;
    }
    bool flag = 0;
    for (int tw = 0; tw < m; tw++) {
      for (int z = n - 2; z >= 0; z--) {
        if (mp.count(z)) {
          if (a[z] > a[z + 1]) {
            swap(a[z], a[z + 1]);
          }
        }
        if (valid(a)) {
          flag = 1;
          break;
        }
      }
      if (flag) {
        break;
      }
    }
    cout << (flag ? "YES\n" : "NO\n");
  }
  return 0;
}
