#include <bits/stdc++.h>
using namespace std;
int n, k, a[400], b[400];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> b[i];
    if (i > 0 && b[i] != b[i - 1]) {
      cout << "Yes";
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == 0) {
      a[i] = b[0];
    }
    if (i > 0 && a[i] <= a[i - 1]) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
