#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int i, j, a[n], p[m];
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    int temp;
    for (i = 0; i < m; i++) {
      cin >> temp;
      p[i] = temp - 1;
    }
    int flag;
    bool possible = false;
    long long int x = 0;
    while (x < 11000) {
      for (i = 0; i < m; i++) {
        if (a[p[i]] > a[p[i] + 1]) {
          temp = a[p[i]];
          a[p[i]] = a[p[i] + 1];
          a[p[i] + 1] = temp;
        }
      }
      flag = 0;
      for (j = 0; j < n - 1; j++) {
        if (a[j] > a[j + 1]) {
          flag = 1;
          break;
        }
      }
      if (flag == 0) {
        possible = true;
        break;
      }
      x++;
    }
    if (possible) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
