#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, w;
  cin >> n >> w;
  vector<pair<int, int>> p(n);
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    p[i].first = a;
    p[i].second = i;
    sum += a;
  }
  if (sum < w) {
    cout << -1 << endl;
    return 0;
  }
  sort(p.begin(), p.end());
  vector<int> ans(n);
  int s = 0;
  for (int i = 0; i < n; i++) {
    if (p[i].first % 2 == 0) {
      ans[p[i].second] = p[i].first / 2;
      w -= p[i].first / 2;
    } else {
      ans[p[i].second] = p[i].first / 2 + 1;
      w -= p[i].first / 2 + 1;
    }
  }
  if (w < 0) {
    cout << -1 << endl;
    return 0;
  }
  reverse(p.begin(), p.end());
  for (int i = 0; i < n; i++) {
    int q = p[i].first - ans[p[i].second];
    if (w - q > 0) {
      ans[p[i].second] += q;
      w -= q;
    } else {
      ans[p[i].second] += w;
      w = 0;
      break;
    }
  }
  for (auto x : ans) cout << x << " ";
  cout << endl;
}
