#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 2e3 + 5;
int A[N];
int B[N];
multiset<pair<int, int> > second;
vector<int> C[N];
vector<int> G;
int first[N];
int main() {
  int n, m;
  cin >> n >> m;
  int ct = 0;
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    first[i] = A[i];
    if (A[i] > m) {
      ct++;
      G.push_back(i);
    } else {
      C[A[i]].push_back(i);
      B[A[i]]++;
    }
  }
  for (int i = 1; i <= m; i++) second.insert(make_pair(B[i], i));
  mx = n / m;
  auto it = second.begin();
  int ans = 0;
  int j = 0;
  while (ct && it->first < mx) {
    int temp = it->first;
    int val = it->second;
    temp++;
    ct--;
    second.erase(it);
    int pos = G[j];
    first[pos] = val;
    second.insert(make_pair(temp, val));
    it = second.begin();
    ans++;
    j++;
  }
  while (it->first < mx) {
    int temp = it->first;
    auto ii = second.end();
    ii--;
    int mx1 = ii->first;
    int val1 = ii->second;
    int temp2 = it->second;
    int pos = C[val1].back();
    assert(pos < n);
    first[pos] = temp2;
    second.erase(ii);
    second.erase(it);
    mx1--;
    temp++;
    second.insert(make_pair(temp, temp2));
    second.insert(make_pair(mx1, val1));
    C[val1].pop_back();
    it = second.begin();
    ans++;
  }
  cout << mx << " " << ans << endl;
  for (int i = 0; i < n; i++) cout << first[i] << " ";
  cout << endl;
  return 0;
}
