#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    int n, w;
    cin >> n >> w;
    vector<pair<long long int, long long int> > a(n);
    vector<long long int> t(n);
    for (long long int i = 0; i < n; i++) {
      cin >> a[i].first;
      a[i].second = i;
    }
    int s = 0;
    sort((a).begin(), (a).end());
    for (long long int i = 0; i < n; i++) {
      s += a[i].first;
      w -= (a[i].first + 1) / 2;
      t[a[i].second] = (a[i].first + 1) / 2;
    }
    if (w < 0 || s < w) {
      cout << -1;
      return 0;
    }
    for (int i = n - 1; i >= 0; i--) {
      int temp = min((long long)w, a[i].first - t[a[i].second]);
      t[a[i].second] += temp;
      w -= temp;
    }
    if (w < 0)
      cout << -1;
    else {
      for (long long int i = 0; i < n; i++) cout << t[i] << " ";
    }
  }
  return 0;
}
