#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, w;
  cin >> n >> w;
  int w1 = w;
  vector<pair<int, pair<int, int>>> a;
  for (int i = 0; i < n; i++) {
    int wi;
    cin >> wi;
    int w_2;
    if (wi % 2 == 0) {
      w_2 = wi / 2;
    } else {
      w_2 = wi / 2 + 1;
    }
    a.push_back({wi, {w_2, i}});
    w1 -= w_2;
  }
  if (w1 < 0) {
    cout << "-1";
    return 0;
  }
  sort(a.begin(), a.end());
  for (int i = n - 1; i >= 0; i--) {
    int n_w = a[i].first - a[i].second.first;
    if (w1 - n_w >= 0) {
      a[i] = {a[i].second.second, {a[i].second.first + n_w, a[i].first}};
      w1 -= n_w;
    } else {
      a[i] = {a[i].second.second, {a[i].second.first + w1, a[i].first}};
      w1 = 0;
    }
  }
  sort(a.begin(), a.end());
  for (auto e : a) {
    cout << e.second.first << " ";
  }
  return 0;
}
