#include <bits/stdc++.h>
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    a[i]--;
  }
  bool ans = true;
  int c[n];
  for (int i = 0; i < k; i++) {
    c[i] = i;
  }
  for (int i = k; i < n; i++) {
    bool v[k];
    memset(v, false, sizeof(v));
    for (int j = 0; j < i; j++) {
      if (a[j] == a[i]) {
        v[c[j]] = true;
      }
    }
    int tc = -1;
    for (int j = 0; j < k; j++) {
      if (!v[j]) {
        tc = j;
        break;
      }
    }
    if (tc >= 0) {
      c[i] = tc;
    } else {
      ans = false;
      break;
    }
  }
  if (ans) {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d%c", c[i] + 1, i == n - 1 ? '\n' : ' ');
    }
  } else {
    printf("NO\n");
  }
  return 0;
}
