#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, w;
  while (cin >> n >> w) {
    int a[n], b[n];
    int sum = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      b[i] = (a[i] + 1) / 2;
      sum += b[i];
    }
    if (sum > w)
      cout << -1 << endl;
    else {
      w -= sum;
      while (w) {
        int maxindex = 0;
        for (int i = 1; i < n; i++) {
          if (a[maxindex] < a[i]) maxindex = i;
        }
        int temp = min(w, a[maxindex] - b[maxindex]);
        b[maxindex] += temp;
        w -= temp;
        a[maxindex] = 0;
      }
      for (int i = 0; i < n - 1; i++) {
        cout << b[i] << ' ';
      }
      cout << b[n - 1] << endl;
    }
  }
  return 0;
}
