#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int maxn = 405;
const int mod = 1e9 + 7;
const int MOD = 998244353;
const double eps = 1e-7;
using namespace std;
int n, k, num[5005];
struct node {
  int v;
  int pos;
  int ans;
} e[5005];
bool cmp1(node a, node b) { return a.v < b.v; }
bool cmp2(node a, node b) { return a.pos < b.pos; }
int main() {
  scanf("%d", &(n)), scanf("%d", &(k));
  bool flag = 1;
  for (int i = 0; i <= n - 1; ++i) {
    scanf("%d", &(e[i].v));
    e[i].pos = i;
    num[e[i].v]++;
    if (num[e[i].v] > k) flag = 0;
  }
  if (!flag) return puts("NO"), 0;
  sort(e, e + n, cmp1);
  puts("YES");
  int cnt = 0;
  for (int i = 0; i <= n - 1; ++i) {
    e[i].ans = 1 + (cnt % k);
    cnt++;
  }
  sort(e, e + n, cmp2);
  for (int i = 0; i <= n - 1; ++i) {
    printf("%d%c", e[i].ans, i == n - 1 ? '\n' : ' ');
  }
  return 0;
}
