#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  int arr[n];
  for (long long i = 0; i < (n); i++) cin >> arr[i];
  int brr[k];
  for (long long i = 0; i < (k); i++) cin >> brr[i];
  sort(brr, brr + k, greater<int>());
  int j = 0;
  for (long long i = 0; i < (n); i++) {
    if (arr[i] == 0) {
      arr[i] = brr[j];
      j++;
    }
  }
  int flag = 0;
  for (long long i = 0; i < (n); i++) {
    if (i > 0 && arr[i] < arr[i - 1]) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
