#include <bits/stdc++.h>
using namespace std;
int main() {
  int s, c, t = 0, fr = 0;
  cin >> s >> c;
  int arr[5010];
  int b[5010];
  int col[5010];
  int co = 1;
  int r = 0;
  for (int i = 0; i < s; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < s; i++) {
    int j;
    for (j = 0; j < i; j++)
      if (arr[i] == arr[j]) break;
    if (i == j) {
      b[r] = arr[i];
      r++;
    }
  }
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < s; j++) {
      if (b[i] == arr[j]) {
        t++;
      }
    }
    if (t >= fr) {
      fr = t;
    }
    t = 0;
  }
  if (fr <= c) {
    cout << "YES" << endl;
    for (int i = 0; i < r; i++) {
      for (int j = 0; j < s; j++) {
        if (b[i] == arr[j]) {
          col[j] = co;
          co = (co + 1) % (c + 1);
          if (co == 0) {
            co = 1;
          }
        }
      }
    }
    for (int i = 0; i < s; i++) {
      cout << col[i] << " ";
    }
  } else {
    cout << "NO" << endl;
  }
}
