#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 1000 + 10;
pair<int, int> a[MAXN];
int c[MAXN];
int main() {
  int n, w;
  cin >> n >> w;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    c[a[i].second] = (a[i].first + 1) / 2;
    w -= (a[i].first + 1) / 2;
    if (w < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    int k = min(a[i].first - c[a[i].second], w);
    w -= k;
    c[a[i].second] += k;
  }
  for (int i = 0; i < n; i++) cout << c[i] << " \n"[i == n - 1];
  return 0;
}
