#include <bits/stdc++.h>
using namespace std;
long long mod = 998244353;
int vis[101];
int main() {
  int n, w;
  cin >> n >> w;
  vector<pair<int, int> > v(n);
  vector<int> ans(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i;
    ans[i] = (v[i].first + 1) / 2;
    w -= ans[i];
  }
  if (w < 0) return cout << -1, 0;
  sort(v.rbegin(), v.rend());
  for (int i = 0; i < n; i++) {
    int x = v[i].first;
    int idx = v[i].second;
    int dif = x - ans[idx];
    dif = min(dif, w);
    w -= dif;
    ans[idx] += dif;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
