#include <bits/stdc++.h>
using namespace std;
struct node {
  int val;
  int vv;
  int id;
};
int a[1003];
node c[1003];
int cmp1(node a, node b) { return a.val > b.val; }
int cmp2(node a, node b) { return a.id < b.id; }
int main() {
  int n, w;
  scanf("%d%d", &n, &w);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int sum = 0;
  int id = 0;
  int maxn = 0;
  for (int i = 1; i <= n; i++) {
    c[i].id = i;
    c[i].val = a[i];
    c[i].vv = (a[i] + 1) / 2;
    sum += c[i].vv;
  }
  sort(c + 1, c + 1 + n, cmp1);
  if (sum > w) {
    printf("-1\n");
  } else {
    w -= sum;
    while (w > 0) {
      for (int i = 1; i <= n; i++)
        if (c[i].vv < c[i].val) {
          c[i].vv++;
          w--;
          if (w == 0) break;
        }
    }
    sort(c + 1, c + 1 + n, cmp2);
    for (int i = 1; i <= n; i++) printf("%d ", c[i].vv);
  }
  return 0;
}
