#include <bits/stdc++.h>
using namespace std;
struct node {
  long long p, x, y;
  node(long long pp = 0, long long xx = 0, long long yy = 0) {
    p = pp, x = xx, y = yy;
  }
};
int main() {
  long long n, m;
  while (scanf("%I64d%I64d", &n, &m) != EOF) {
    vector<node> v;
    for (int i = 0; i < n; i++) {
      long long x;
      scanf("%I64d", &x);
      v.push_back(node(i, x, 0));
    }
    sort(v.begin(), v.end(),
         [](const node &x, const node &y) { return x.x > y.x; });
    for (int i = 0; i < n; i++) {
      v[i].y = v[i].x / 2 + v[i].x % 2;
      m -= v[i].y;
    }
    if (m < 0) {
      puts("-1");
    } else {
      for (int i = 0; i < n; i++) {
        long long down = min(m, v[i].x - v[i].y);
        v[i].y += down;
        m -= down;
        if (m == 0) break;
      }
      sort(v.begin(), v.end(),
           [](const node &x, const node &y) { return x.p < y.p; });
      for (int i = 0; i < n; i++) {
        if (i) printf(" ");
        printf("%I64d", v[i].y);
      }
      printf("\n");
    }
  }
}
