#include <bits/stdc++.h>
using namespace std;
int arr[105];
vector<int> p;
int main() {
  int t, n, m;
  int b, v;
  scanf("%d", &t);
  while (t--) {
    b = 0;
    scanf("%d %d", &n, &m);
    p.resize(n + 1);
    for (int i = 1; i <= n; ++i) {
      scanf("%d", arr + i);
    }
    for (int i = 1; i <= m; ++i) {
      scanf("%d", &v);
      p[v] = 1;
    }
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j < n; ++j) {
        if (arr[j] > arr[j + 1] && p[j] == 1) {
          swap(arr[j], arr[j + 1]);
        }
      }
    }
    for (int i = 1; i < n; ++i) {
      if (arr[i] > arr[i + 1]) {
        b = 1;
        break;
      }
    }
    for (int i = 1; i < n; ++i) {
      if (arr[i] > arr[i + 1]) {
        b = 1;
        break;
      }
    }
    if (b == 0) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
    p.clear();
  }
  return 0;
}
