#include <bits/stdc++.h>
using namespace std;
void FastInputOutput() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  vector<int> a(n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  vector<int> p(k);
  for (int i = 0; i < k; ++i) scanf("%d", &p[i]);
  sort(p.rbegin(), p.rend());
  int j = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] == 0) a[i] = p[j++];
  }
  bool flag = false;
  for (int i = 0; i < a.size() - 1; ++i) {
    flag = (a[i] > a[i + 1]);
    if (flag) break;
  }
  printf(flag ? "YES" : "NO");
  return 0;
}
