#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  long long n, w;
  cin >> n >> w;
  std::vector<pair<long long, pair<long long, long long> > > a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second.first = i;
    a[i].second.second = 0;
  }
  sort(a.begin(), a.end());
  for (long long i = a.size() - 1; i >= 0; i--) {
    w -= ceil((double)a[i].first / 2.0);
    a[i].second.second += ceil((double)a[i].first / 2.0);
  }
  if (w < 0) {
    cout << -1 << '\n';
    return 0;
  }
  for (long long i = a.size() - 1; i >= 0 && w > 0; i--) {
    long long t = ((a[i].first - a[i].second.second) > w)
                      ? w
                      : ((a[i].first - a[i].second.second));
    w -= t;
    a[i].second.second += t;
  }
  vector<pair<long long, long long> > ans;
  for (long long i = 0; i < a.size(); i++) {
    ans.push_back(make_pair(a[i].second.first, a[i].second.second));
  }
  sort(ans.begin(), ans.end());
  for (long long i = 0; i < a.size(); i++) {
    cout << ans[i].second << ' ';
  }
  return 0;
}
