#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  int flag = false;
  vector<int> nums;
  scanf("%d %d", &(n), &(k));
  int tmp, pre = -1;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &(tmp));
    nums.push_back(tmp);
  }
  int Min = 2147483647;
  for (int i = 0; i < k; ++i) {
    scanf("%d", &(tmp));
    Min = min(tmp, Min);
  }
  int Max = -1;
  if (k > 1) {
    printf("Yes\n");
    return 0;
  } else {
    for (int i : nums) {
      if (i == 0) i = Min;
      if (i < Max) {
        printf("Yes\n");
        return 0;
      }
      Max = max(Max, i);
    }
  }
  printf("No\n");
  return 0;
}
