#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, x = 0, d, y = 0;
  cin >> n >> k;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  int b[k];
  for (i = 0; i < k; i++) {
    cin >> b[i];
  }
  for (i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      x++;
    }
  }
  for (i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      y++;
    }
  }
  if (k == 1) {
    for (i = 0; i < n; i++) {
      if (a[i] == 0) {
        d = i;
      }
    }
    if (x == n - 1 && (a[d + 1] > b[0])) {
      cout << "NO" << endl;
    } else if (y >= 2) {
      cout << "YES" << endl;
    } else if (d == n - 1 && ((a[d - 1] < b[0]))) {
      cout << "NO" << endl;
    } else if (x == n - 2 && (a[d - 1] < b[0]) && (a[d + 1] > b[0])) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  } else {
    cout << "YES" << endl;
  }
}
