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