#include <bits/stdc++.h>
using namespace std;
struct compare {
  bool operator()(pair<long long int, long long int> const &a,
                  pair<long long int, long long int> const &b) {
    return a.first > b.first;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  long long int p1, p2, n, w, sum = 0, k;
  cin >> n >> w;
  vector<pair<long long int, long long int> > ai(n);
  vector<long long int> result(n);
  for (p1 = 0; p1 < n; p1++) {
    cin >> ai[p1].first;
    ai[p1].second = p1;
    sum += ceil(float(ai[p1].first) / 2.0);
  }
  sort(ai.begin(), ai.end(), compare());
  if (w < sum) {
    cout << -1;
    return 0;
  }
  w -= sum;
  p1 = 0;
  while (p1 < n) {
    k = ceil(float(ai[p1].first) / 2.0);
    result[ai[p1].second] = k + min(w, ai[p1].first - k);
    w = max(0ll, w - ai[p1].first + k);
    p1++;
  }
  for (p1 = 0; p1 < n; p1++) cout << result[p1] << " ";
  return 0;
}
