#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) { return (a.second < b.second); }
int main() {
  int n, w;
  cin >> n >> w;
  int a[n], s = 0;
  vector<pair<int, int>> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s += ceil(a[i] / 2.0);
    v.push_back({a[i], i});
  }
  if (w < s) {
    cout << "-1\n";
    return 0;
  }
  sort(v.begin(), v.end());
  int i = n - 1;
  int x = w - s;
  while (x) {
    int cap = v[i].first;
    int amount = ceil(v[i].first / 2.0);
    if (cap - amount > x) {
      v[i].first = amount + x;
      x = 0;
    } else {
      v[i].first = cap;
      x = x - cap + amount;
    }
    i--;
  }
  for (int j = 0; j <= i; j++) v[j].first = ceil(v[j].first / 2.0);
  sort(v.begin(), v.end(), comp);
  for (auto i : v) cout << i.first << " ";
  cout << "\n";
}
