#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> hitagi;
  hitagi.resize(n);
  vector<int> faults;
  faults.resize(k);
  bool ascendent = true;
  int previous = 0;
  for (int i = 0; i < n; ++i) {
    cin >> hitagi[i];
  }
  for (int i = 0; i < k; ++i) {
    cin >> faults[i];
  }
  sort(faults.begin(), faults.end());
  reverse(faults.begin(), faults.end());
  for (int i = 0; i < faults.size(); ++i) {
    for (int j = 0; j < hitagi.size(); ++j) {
      if (hitagi[j] == 0) {
        hitagi[j] = faults[i];
        break;
      }
    }
  }
  if (is_sorted(hitagi.begin(), hitagi.end()))
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
