#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, w, x, i = 0;
  vector<pair<int, int> > ar;
  vector<int> ans;
  scanf("%d", &n);
  scanf("%d", &w);
  while (n--) {
    scanf("%d", &x);
    ar.push_back(make_pair(x, i));
    ans.push_back(x);
    i++;
  }
  for (i = 0; i < ar.size(); i++) {
    ans[i] = (ar[i].first + 1) / 2;
    w -= (ar[i].first + 1) / 2;
  }
  sort(ar.begin(), ar.end());
  if (w < 0) {
    printf("-1");
    exit(0);
  }
  for (i = ar.size() - 1; w > 0 && i >= 0; i--) {
    if (w > (ar[i].first - ans[ar[i].second])) {
      w -= (ar[i].first - ans[ar[i].second]);
      ans[ar[i].second] = ar[i].first;
    } else {
      ans[ar[i].second] += w;
      w = 0;
    }
  }
  for (i = 0; i < ar.size(); i++) {
    printf("%d ", ans[i]);
  }
}
