#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << "[ " << *it << " = " << a << " ] ";
  err(++it, args...);
}
class node {
 public:
  int vol, tea, id;
  node(int a, int b, int c) { vol = a, tea = b, id = c; }
};
bool cmp(const node &a, const node &b) {
  if (a.vol == b.vol) return a.tea > b.tea;
  return a.vol > b.vol;
}
void test(int T) {
  int n, w, i, j, p, need;
  scanf("%d %d", &n, &w);
  vector<int> v(n);
  for (i = 0; i < n; i++) scanf("%d", &(v[i]));
  vector<node> cups;
  for (i = 0; i < n; i++) {
    need = v[i] & 1 ? (v[i] >> 1) + 1 : v[i] >> 1;
    w -= need;
    cups.push_back(node(v[i], need, i));
  }
  sort(cups.begin(), cups.end(), cmp);
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (cups[i].vol > cups[j].vol and cups[i].tea < cups[j].tea) {
        need = cups[j].tea - cups[i].tea + 1;
        cups[i].tea + need;
        w -= need;
      }
    }
  }
  if (w < 0) {
    printf("-1\n");
    return;
  }
  for (i = 0; i < n; i++) {
    if (cups[i].tea > cups[i].vol) {
      printf("-1\n");
      return;
    }
    if (w) {
      need = min(w, cups[i].vol - cups[i].tea);
      cups[i].tea += need;
      w -= need;
    }
    v[cups[i].id] = cups[i].tea;
  }
  for (i = 0; i < n; i++) printf("%d%c", v[i], " \n"[i == n - 1]);
}
void Test() {
  int T;
  scanf("%d", &T);
  for (int cs = 1; cs <= T; cs++) test(cs);
}
int main() {
  test(1);
  return 0;
}
