#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, k, j, l, n, m, t;
  t = 1;
  while (t--) {
    cin >> n >> m;
    vector<long long> a, b;
    for (i = 0; i < n; i++) {
      cin >> k;
      a.push_back(k);
    }
    for (i = 0; i < m; i++) {
      cin >> k;
      b.push_back(k);
    }
    j = m - 1;
    if (m >= 2) {
      cout << "YES\n";
      return 0;
    }
    for (i = 0; i < n; i++) {
      if (a[i] == 0) {
        a[i] = b[j];
        j--;
      }
    }
    vector<long long> c(a);
    sort(c.begin(), c.end());
    if (c == a) {
      cout << "NO";
    } else
      cout << "YES";
  }
  return 0;
}
