#include <bits/stdc++.h>
using namespace std;
long n, q;
long const maxN = 2e5 + 5;
long a[maxN], pre[maxN], suf[maxN];
vector<long> arr, mark;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> q;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] != 0) arr.push_back(a[i]);
  }
  mark.assign(maxN, 0);
  for (int i = 0; i < arr.size(); ++i) {
    if (mark[arr[i]] == 0) {
      mark[arr[i]] = 1;
      pre[arr[i]] = i;
    }
  }
  mark.assign(maxN, 0);
  for (int i = arr.size() - 1; i >= 0; --i) {
    if (mark[arr[i]] == 0) {
      mark[arr[i]] = 1;
      suf[arr[i]] = i;
    }
  }
  for (int i = 1; i < arr.size(); ++i) {
    if (arr[i] < arr[i - 1] && pre[arr[i - 1]] < i && suf[arr[i - 1]] > i) {
      cout << "NO";
      return 0;
    }
  }
  bool ok = false;
  for (int i = 0; i < arr.size(); ++i)
    if (arr[i] == q) ok = true;
  if (ok) {
    a[0] = arr[0];
  } else {
    if (arr.size() == n) {
      cout << "NO";
      return 0;
    }
    for (int i = 1; i <= n; ++i)
      if (a[i] == 0) {
        a[i] = q;
        break;
      }
  }
  cout << "YES" << '\n';
  for (int i = 1; i <= n; ++i) {
    if (a[i] == 0) a[i] = a[i - 1];
    cout << a[i] << ' ';
  }
  return 0;
}
