#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, w, u = 0, sm = 0, ms = 0;
  cin >> n >> w;
  vector<pair<int, int>> pr(n);
  vector<int> an(n);
  for (auto &x : pr) {
    cin >> x.first, x.second = u;
    sm += (x.first + 1) / 2, an[u++] = (x.first + 1) / 2, ms += x.first;
  }
  sort(pr.rbegin(), pr.rend());
  if (sm <= w && w <= ms) {
    w -= sm;
    for (auto x : pr) {
      int mn = min(x.first - (x.first + 1) / 2, w);
      an[x.second] += mn;
      w -= mn;
      if (!w) break;
    }
    for (int x : an) cout << x << " ";
  } else
    cout << -1;
}
