#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, t, p, q;
  cin >> n >> k;
  if (k >= 2) {
    cout << "YES";
    return 0;
  }
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 0) j = i;
  }
  int b[k];
  for (i = 0; i < k; i++) cin >> b[i];
  if (j == 0) {
    if (a[1] > b[0]) {
      bool f = 1;
      for (i = 2; i < n; i++) {
        if (a[i] <= a[i - 1]) {
          cout << "YES";
          return 0;
        }
      }
      cout << "NO";
    } else
      cout << "YES";
    return 0;
  }
  if (j == n - 1) {
    if (a[n - 2] < b[0]) {
      for (i = 1; i <= n - 2; i++) {
        if (a[i] <= a[i - 1]) {
          cout << "YES";
          return 0;
        }
      }
      cout << "NO";
    } else
      cout << "YES";
    return 0;
  }
  if (a[j - 1] < b[0] && b[0] < a[j + 1]) {
    for (i = 1; i < j; i++) {
      if (a[i] <= a[i - 1]) {
        cout << "YES";
        return 0;
      }
    }
    for (i = j + 2; i < n; i++) {
      if (a[i] <= a[i - 1]) {
        cout << "YES";
        return 0;
      }
    }
    cout << "NO";
  } else
    cout << "YES";
  return 0;
}
