#include <bits/stdc++.h>
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int a[n];
  int cnt[5000] = {0};
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    cnt[--a[i]]++;
  }
  int cntma = 0;
  for (int i = 0; i < 5000; i++) {
    cntma = cnt[i] > cntma ? cnt[i] : cntma;
  }
  if (cntma > k) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  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;
    for (int j = 0; j < k; j++) {
      if (!v[j]) {
        tc = j;
        break;
      }
    }
    c[i] = tc;
  }
  for (int i = 0; i < n; i++) {
    printf("%d%c", c[i] + 1, i == n - 1 ? '\n' : ' ');
  }
  return 0;
}
