#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int arr1[n], arr2[k];
  cin >> arr1[0];
  bool flag = false;
  int val = arr1[0];
  for (int i = 1; i < n; i++) {
    cin >> arr1[i];
    if (arr1[i] != 0 && arr1[i] < val) {
      flag = true;
    }
  }
  for (int i = 0; i < k; i++) cin >> arr2[i];
  if (flag)
    puts("YES");
  else {
    int idx = k - 1;
    sort(arr2, arr2 + k);
    for (int i = 0; i < n; i++) {
      if (arr1[i] == 0 && idx >= 0) {
        arr1[i] = arr2[idx];
        idx--;
      }
    }
    if (is_sorted(arr1, arr1 + n))
      puts("NO");
    else
      puts("YES");
  }
  return 0;
}
