#include <bits/stdc++.h>
struct el {
  int x, y, z;
};
using namespace std;
int cmp(el a, el b) { return a.x < b.x; }
int cmp1(el a, el b) { return a.y < b.y; }
int main(int argc, const char* argv[]) {
  int n, w;
  cin >> n >> w;
  vector<el> a;
  el b;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> b.x;
    ans += b.x / 2 + b.x % 2;
    b.z = b.x / 2 + b.x % 2;
    b.y = i;
    a.push_back(b);
  }
  if (ans > w) {
    cout << -1;
    return 0;
  }
  int diff = w - ans;
  sort(a.begin(), a.end(), cmp);
  for (int i = (int)a.size() - 1; (i > -1) && (diff > 0); i--) {
    int tmp = min(diff, a[i].x - (a[i].x / 2 + a[i].x % 2));
    a[i].z += tmp;
    diff -= tmp;
  }
  sort(a.begin(), a.end(), cmp1);
  for (auto i = a.begin(); i != a.end(); i++) {
    cout << (*i).z << ' ';
  }
  return 0;
}
