#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T lowbit(T x) {
  return x & (-x);
}
const int MAXN = 2000 + 5;
int A[MAXN], B[MAXN];
int cnt[MAXN];
queue<int> pos[MAXN];
int main(void) {
  int n, m;
  scanf("%d%d", &n, &m);
  queue<int> g;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    if (A[i] > m)
      g.push(i);
    else {
      cnt[A[i]]++;
      pos[A[i]].push(i);
    }
  }
  set<pair<int, int> > st;
  int ans = 0x3f3f3f3f, num = 0;
  for (int i = 1; i <= m; i++) {
    st.insert(pair<int, int>(cnt[i], i));
    ans = min(cnt[i], ans);
  }
  int tmp = 0;
  vector<pair<int, int> > buf;
  while (!g.empty()) {
    int x = g.front();
    g.pop();
    pair<int, int> cur = *st.begin();
    st.erase(cur);
    buf.push_back(pair<int, int>(x, cur.second));
    cur.first++;
    tmp++;
    st.insert(cur);
    if (st.begin()->first > ans) {
      ans = st.begin()->first;
      num = tmp;
      for (auto p : buf) {
        A[p.first] = p.second;
      }
      buf.clear();
    }
  }
  while (st.begin()->first < st.rbegin()->first - 1) {
    pair<int, int> s = *st.begin(), e = *st.rbegin();
    st.erase(s);
    st.erase(e);
    s.first++, e.first--;
    int p = pos[e.second].front();
    pos[e.second].pop();
    tmp++;
    buf.push_back(pair<int, int>(p, s.second));
    st.insert(s);
    st.insert(e);
    if (st.begin()->first > ans) {
      ans = st.begin()->first;
      num = tmp;
      for (auto pp : buf) {
        A[pp.first] = pp.second;
      }
      buf.clear();
    }
  }
  printf("%d %d\n", ans, num);
  for (int i = 1; i <= n; i++) {
    printf("%d ", A[i]);
  }
  return 0;
}
