#include <bits/stdc++.h>
using namespace std;
struct he {
  int a, num, b;
} e[110];
bool cmp(he x, he y) { return x.a > y.a; }
bool comp(he x, he y) { return x.num < y.num; }
int main() {
  int n, w, sum = 0;
  scanf("%d%d", &n, &w);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &e[i].a);
    e[i].num = i;
    if (e[i].a % 2 == 1) {
      sum += e[i].a / 2 + 1;
      e[i].b = e[i].a / 2 + 1;
    } else {
      sum += e[i].a / 2;
      e[i].b = e[i].a / 2;
    }
  }
  if (sum > w) {
    printf("-1\n");
    return 0;
  }
  sort(e + 1, e + n + 1, cmp);
  int cnt = 1;
  while (sum < w) {
    if (e[cnt].b < e[cnt].a) {
      e[cnt].b++;
      sum++;
    } else
      cnt++;
  }
  sort(e + 1, e + n + 1, comp);
  for (int i = 1; i <= n; i++) {
    printf("%d ", e[i].b);
  }
  return 0;
}
