#include <bits/stdc++.h>
using namespace std;
const long long int M = 1000000007;
const long long int N = 998244353;
inline int add(int a, int b, int MOD) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
inline int sub(int a, int b, int MOD) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
inline int mul(int a, int b, int MOD) { return (int)((int)a * b % MOD); }
int power(int x, unsigned int y, unsigned int m) {
  if (y == 0) return 1;
  int p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
struct comp {
  template <typename T>
  bool operator()(const T &a, const T &b) {
    if (a.first == b.first)
      return (a.second < b.second);
    else
      return (a.first < b.first);
  }
};
bool mod(const pair<long long int, long long int> &a,
         const pair<long long int, long long int> &b) {
  if (a.first != b.first)
    return (a.first < b.first);
  else
    return (a.second < b.second);
}
void sieve(vector<long long int> &prime) {
  long long int maxN = 10000;
  vector<bool> pr(maxN + 1, 1);
  for (int i = 2; i * i <= maxN; i++)
    if (pr[i] == 1)
      for (int j = i * i; j <= maxN; j += i) pr[j] = 0;
  for (long long int i = 2; i <= maxN; i++)
    if (pr[i] == 1) prime.push_back(i);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long int n, m, l, i, j, k, num, num1, num2, flag = 0;
    cin >> n >> m;
    vector<long long int> a;
    for (i = 0; i < n; i++) {
      cin >> num;
      a.push_back(num);
    }
    set<long long int> p;
    for (i = 0; i < m; i++) {
      cin >> num;
      p.insert(num);
    }
    set<long long int> s;
    for (j = 0; j < n; j++) {
      for (i = 0; i < n - 1; i++) {
        if (a[i] > a[i + 1]) {
          swap(a[i], a[i + 1]);
          s.insert(i + 1);
        }
      }
    }
    for (auto it = s.begin(); it != s.end(); it++) {
      if (p.find(*it) == p.end()) {
        flag++;
        break;
      }
    }
    if (flag == 1)
      cout << "NO"
           << "\n";
    else
      cout << "YES"
           << "\n";
  }
  return 0;
}
