#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, x;
  cin >> n >> m;
  int a[n], b[n];
  bool chut = 1;
  for (x = 0; x < n; x++) cin >> a[x];
  for (x = 0; x < m; x++) cin >> b[x];
  if (m == 1) {
    for (x = 0; x < n; x++)
      if (a[x] == 0) {
        a[x] = b[0];
        break;
      }
    b[n] = a[n];
    x = 0;
    while (x < n - 1) {
      if (a[x] >= a[x + 1]) {
        chut = 0;
        break;
      }
      ++x;
    }
    chut == 0 ? cout << "YES" << endl : cout << "NO" << endl;
  } else
    cout << "YES" << endl;
  getchar();
  return 0;
}
