#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  t = 1;
  while (t--) {
    long long int i, j, k, l, n, m = 0, q = 0, ans = 0, count, p = 0, a[200005],
                                 lo = 0;
    cin >> n >> k;
    float f;
    count = k;
    for (i = 0; i < n; i++) cin >> a[i];
    f = (float)3 / (float)2;
    cout << f << " " << ceil(f) << endl;
    for (i = 0; i < n; i++) {
      if (lo != 0) {
        if (lo < a[i]) {
          f = (float)(a[i] - lo) / (float)k;
          ans = ans + ceil(f);
          if ((a[i] - lo) % k != 0)
            lo = k - (a[i] - lo) % k;
          else
            lo = 0;
        } else {
          ans = ans;
          lo = 0;
        }
      } else {
        f = ((float)a[i]) / (float)(k);
        ans = ans + ceil(f);
        cout << ans << " ";
        if (a[i] % k != 0)
          lo = k - a[i] % k;
        else
          lo = 0;
      }
    }
    cout << ans;
  }
  return 0;
}
