#include <bits/stdc++.h>
const double INF = 0xfffff;
using namespace std;
int a[205], b[205];
bool cmp(int a, int b) { return a > b; }
int main() {
  int m, n, i;
  int flag;
  int t;
  while (scanf("%d%d", &m, &n) != EOF) {
    flag = 0;
    t = 0;
    for (i = 0; i < m; i++) scanf("%d", &a[i]);
    for (i = 0; i < n; i++) scanf("%d", &b[i]);
    sort(b, b + n, cmp);
    if (a[0] == 0) a[0] = b[t++];
    for (i = 1; i < m; i++) {
      if (a[i] == 0) a[i] = b[t++];
      if (a[i] <= a[i - 1]) {
        flag = 1;
        break;
      }
    }
    if (flag == 1)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
