#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int i, j, n, w;
  cin >> n >> w;
  int fill[n];
  int arr[n], s = 0, mx = -10000;
  j = 0;
  int tot = 0;
  vector<pair<int, int> > order;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    order.push_back(make_pair(arr[i], i));
    s += (arr[i] + 1) / 2;
    fill[i] = (arr[i] + 1) / 2;
  }
  if (s > w) {
    cout << "-1";
    return 0;
  }
  sort(order.begin(), order.end());
  int left = w - s;
  int sz = order.size() - 1;
  while (left > 0) {
    i = order[sz].second;
    int l = arr[i] - fill[i];
    if (l <= left)
      fill[i] += l;
    else
      fill[i] += left;
    left -= l;
    sz--;
  }
  for (i = 0; i < n; i++) cout << fill[i] << " ";
  return 0;
}
