#include <bits/stdc++.h>
using namespace std;
int na, nb;
int a[400];
int b[400];
vector<int> v;
int main() {
  scanf("%d%d", &na, &nb);
  if (nb > 1) {
    printf("Yes\n");
    return 0;
  }
  for (int i = 0; i < na; i++) {
    scanf("%d", a + i);
    if (a[i] == 0) continue;
    v.push_back(a[i]);
  }
  for (int i = 0; i < nb; i++) {
    scanf("%d", b + i);
    v.push_back(b[i]);
  }
  sort(v.begin(), v.end());
  bool fail = false;
  for (int i = 0; i < na; i++) {
    if (a[i] != v[i] && a[i] != 0) {
      fail = true;
    }
  }
  if (fail)
    printf("Yes\n");
  else
    printf("No\n");
}
