#include <bits/stdc++.h>
using namespace std;
struct comp {
  bool operator()(int& a, int& b) { return a > b; }
};
struct TAZA {
  int index;
  int cap;
  int tea;
};
bool comparador1(struct TAZA a, struct TAZA b) { return (a.cap) > (b.cap); }
bool comparador2(struct TAZA a, struct TAZA b) { return (a.index) < (b.index); }
int main() {
  int n, w, x, ant, act, suma, cant;
  cin >> n >> w;
  struct TAZA aux;
  vector<struct TAZA> a;
  for (int i = 0; i < n; i++) {
    cin >> x;
    aux.index = i;
    aux.cap = x;
    aux.tea = (x + 1) / 2;
    w = w - aux.tea;
    a.push_back(aux);
  }
  sort(a.begin(), a.end(), comparador1);
  if (w < 0) {
    cout << -1 << endl;
  } else {
    int it = 0;
    while (w > 0) {
      if (w >= (a[it].cap) / 2) {
        w = w - (a[it].cap) / 2;
        a[it].tea = a[it].cap;
      } else {
        a[it].tea = a[it].tea + w;
        w = 0;
        break;
      }
      it++;
    }
    sort(a.begin(), a.end(), comparador2);
    for (int i = 0; i < n; i++) {
      cout << a[i].tea << " ";
    }
  }
}
