#include <bits/stdc++.h>
using namespace std;
map<char, long long> mp, np;
vector<pair<int, int>> v;
vector<long long> v1;
int main() {
  long long n, w, i, j, f = 0, k, s = 0, p;
  cin >> n >> w;
  for (i = 0; i < n; i++) {
    cin >> k;
    s += k;
    v1.push_back(k);
    v.push_back(make_pair(k, i));
  }
  sort(v.begin(), v.end());
  for (i = 0; i < n; i++) {
    v1[v[i].second] = (v[i].first + 1) / 2;
    w -= v1[v[i].second];
    if (w < 0) {
      cout << "-1";
      return 0;
    }
  }
  for (i = n - 1; i >= 0; i--) {
    if (w < v[i].first - v1[v[i].second]) {
      v1[v[i].second] += w;
      break;
    } else {
      v1[v[i].second] = v[i].first;
      w -= (v[i].first) / 2;
    }
  }
  for (i = 0; i < n; i++) {
    cout << v1[i] << " ";
  }
  return 0;
}
