#include <bits/stdc++.h>
using namespace std;
const int N = 1003000;
const int MOD = 2e9 + 7;
long long a[N], a1[N], a2[501];
bool used[N];
vector<int> v, v1[N], v2;
long long sum = 0;
char k[N];
string s[1000], s1[1000];
int main() {
  ios_base::sync_with_stdio(0);
  long long n, m = 0, ans = 0, c = 0, t = 1;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (i > 1) {
      if (a[i] < a[i - 1] && a[i] != 0 && a[i - 1] != 0) t++;
    }
  }
  for (int i = 1; i <= m; i++) {
    cin >> a1[i];
    a2[a1[i]]++;
    c = max(c, a2[a1[i]]);
  }
  if ((c != m && m > 1) || t >= 2) {
    cout << "Yes";
    return 0;
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if ((a1[i] > a[j + 1] && a[j] == 0 && a[j + 1] != 0) ||
          (a[j] == 0 && a1[i] < a[j - 1] && a[j - 1] != 0)) {
        cout << "Yes";
        return 0;
      }
    }
  }
  cout << "No";
}
