#include <bits/stdc++.h>
using namespace std;
map<int, int> cnt;
vector<int> v;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m, a[2010], b[2010];
  cin >> n >> m;
  int good = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
    if (a[i] > m) v.push_back(i);
    b[i] = a[i];
  }
  for (int i = 0; i < n; i++) {
    if (a[i] <= m && (cnt[a[i]] > (n / m))) cnt[a[i]]--, v.push_back(i);
  }
  cout << n / m << " ";
  int idx = 0;
  for (int i = 1; i <= m && idx < v.size(); i++) {
    while (cnt[i] < (n / m)) cnt[i]++, a[v[idx++]] = i;
  }
  int res = 0;
  for (int i = 0; i < n; i++) res += (a[i] != b[i]);
  cout << res << endl;
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
  return 0;
}
