#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 1e6 + 5;
int main() {
  long long n, m, t;
  cin >> t;
  while (t--) {
    long long a[105], p[105], f = 0;
    cin >> n >> m;
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 1; i <= m; i++) cin >> p[i];
    for (int j = 1; j <= n; j++) {
      for (int i = 1; i <= m; i++) {
        if (a[p[i]] >= a[p[i] + 1]) swap(a[p[i]], a[p[i] + 1]);
      }
    }
    for (int i = 1; i < n; i++) {
      if (a[i + 1] < a[i]) {
        f = 1;
        break;
      }
    }
    if (!f)
      cout << "YES";
    else
      cout << "NO";
    cout << endl;
  }
  return 0;
}
