#include <bits/stdc++.h>
using namespace std;
int n, m, ans, sz;
int a[200005], tmp, T[200005];
pair<int, int> K[200005];
vector<int> v[200005];
map<int, int> M;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) M[i] = 1;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), M[a[i]] = 1;
  for (auto i : M) M[i.first] = ++tmp;
  for (int i = 1; i <= n; i++) v[M[a[i]]].push_back(i);
  for (auto i : M)
    if (i.first > m) T[sz++] = i.second;
  for (int i = 1; i <= m; i++) K[i] = {v[i].size(), i};
  sort(K + 1, K + 1 + m);
  int rem = n % m;
  for (int i = 1; i <= m; i++) {
    for (int h = 0; h <= sz - 1; h++)
      while (K[i].first < n / m && v[T[h]].size() != 0)
        K[i].first++, a[v[T[h]].back()] = K[i].second, v[T[h]].pop_back(),
                      ans++;
    for (int h = 1; h <= m; h++)
      while (K[h].first > n / m && K[i].first < n / m)
        K[i].first++, K[h].first--, a[v[K[h].second].back()] = K[i].second,
                                    v[K[h].second].pop_back(), ans++;
  }
  printf("%d %d\n", n / m, ans);
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
}
