#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long R = 7 + 1e9, R1 = 19491001, R2 = 236, NUMTESTCASE;
const long long NN = 10 + 1e6;
const double pi = acos(-1.0);
int di[8] = {1, 0, -1, 0, 1, -1, 1, -1}, dj[8] = {0, 1, 0, -1, 1, -1, -1, 1};
int w, n, Ans[NN];
pair<int, int> Arr[NN];
int main() {
  cin >> n >> w;
  for (int i = (1); i <= (n); ++i) cin >> Arr[i].first, Arr[i].second = i;
  sort(Arr + 1, Arr + 1 + n);
  for (int i = (1); i <= (n); ++i) {
    int t = (Arr[i].first + 1) / 2;
    w -= t;
    Arr[i].first -= t;
    Ans[Arr[i].second] = t;
  }
  if (w < 0) return cout << -1, 0;
  for (int i = (n); i >= (1); --i) {
    int t = min(Arr[i].first, w);
    Ans[Arr[i].second] += t;
    w -= t;
  }
  for (int i = (1); i <= (n); ++i) cout << Ans[i] << " ";
  return 0;
}
