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