#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 100 * 3 + 10;
int a[MAXN];
int cnt[MAXN];
long long int mod = 1000 * 1000 * 1000 + 7;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, q;
  cin >> n >> q;
  a[0] = 1;
  a[n + 1] = 1;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i <= n + 1; i++) {
    cnt[a[i]]++;
  }
  if (cnt[q] == 0) {
    if (cnt[0] == 0) {
      cout << "NO" << endl;
      return 0;
    } else {
      for (int i = 1; i <= n; i++) {
        if (a[i] == 0) {
          a[i] = q;
          cnt[0]--;
          cnt[q]++;
          break;
        }
      }
    }
  }
  set<long long int> s;
  for (int i = 0; i <= n + 1; i++) {
    if (a[i] == 0) {
      a[i] = (*s.rbegin());
    } else {
      s.insert(a[i]);
      if ((*s.rbegin()) != a[i]) {
        cout << "NO" << endl;
        return 0;
      }
      if (--cnt[a[i]] == 0) {
        s.erase(a[i]);
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) cout << a[i] << ' ';
  return 0;
}
