#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > a;
int main() {
  int i, j, k, l, n, w, val = 0, b[100];
  cin >> n >> w;
  for (i = 0; i < n; i++) {
    cin >> k;
    b[i] = k;
    a.push_back({k, i});
  }
  sort(a.begin(), a.end());
  for (i = 0; i < n; i++) {
    int v = a[i].first;
    if (v % 2 == 0) {
      a[i].first /= 2;
      val += a[i].first;
    } else {
      a[i].first = a[i].first / 2 + 1;
      val += a[i].first;
    }
  }
  if (w - val >= 0) {
    k = w - val;
    i = n - 1;
    while (k > 0) {
      if (k >= b[a[i].second] - a[i].first) {
        k -= b[a[i].second] - a[i].first;
        a[i].first += b[a[i].second] - a[i].first;
      } else {
        a[i].first += k;
        k = 0;
      }
      i--;
    }
    for (i = 0; i < n; i++) {
      int temp = a[i].first;
      a[i].first = a[i].second;
      a[i].second = temp;
    }
    sort(a.begin(), a.end());
    for (i = 0; i < n; i++) cout << a[i].second << " ";
  } else
    cout << -1 << endl;
  return 0;
}
