#include <bits/stdc++.h>
using namespace std;
using LL = long long;
int a[1234], b[1234];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  if (m > 1) {
    puts("Yes");
    return 0;
  }
  for (int i = 0; i < n; i++)
    if (a[i] == 0) a[i] = b[0];
  int flag = 0;
  for (int i = 1; i < n; i++)
    if (a[i] < a[i - 1]) flag = 1;
  puts(flag ? "Yes" : "No");
  return 0;
}
