#include <bits/stdc++.h>
using namespace std;
size_t count_extends(const map<int, set<int> > &M) {
  size_t ans = 0;
  map<int, set<int> >::const_iterator it = M.begin();
  it++;
  while (it != M.end())
    ans += it->second.size() * (it->first - M.begin()->first - 1), it++;
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  stack<int> trash;
  vector<int> count(m + 1);
  vector<stack<int> > group_places(m + 1, stack<int>());
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > m)
      trash.push(i);
    else
      count[a[i]]++, group_places[a[i]].push(i);
  }
  map<int, set<int> > group_ranks;
  int changes = 0;
  for (int i = 1; i <= m; i++) group_ranks[count[i]].insert(i);
  while (group_ranks.begin()->second.size() <=
         count_extends(group_ranks) + trash.size()) {
    for (set<int>::iterator it = group_ranks.begin()->second.begin();
         it != group_ranks.begin()->second.end(); it++) {
      if (group_ranks.rbegin()->second.size() == 0)
        group_ranks.erase(group_ranks.rbegin()->first);
      if (trash.size()) {
        group_ranks[group_ranks.begin()->first + 1].insert(*it);
        group_places[*it].push(trash.top());
        a[trash.top()] = *it;
        trash.pop();
        changes++;
      } else {
        group_ranks[group_ranks.begin()->first + 1].insert(*it);
        group_ranks[group_ranks.rbegin()->first - 1].insert(
            *group_ranks.rbegin()->second.begin());
        a[group_places[*group_ranks.rbegin()->second.begin()].top()] = *it;
        group_places[*it].push(
            group_places[*group_ranks.rbegin()->second.begin()].top());
        group_places[*group_ranks.rbegin()->second.begin()].pop();
        group_ranks.rbegin()->second.erase(
            group_ranks.rbegin()->second.begin());
        changes++;
      }
    }
    group_ranks.erase(group_ranks.begin());
  }
  cout << group_ranks.begin()->first << ' ' << changes << '\n';
  for (int i = 0; i < n; i++) cout << a[i] << ' ';
  cout << '\n';
  return 0;
}
