#include <bits/stdc++.h>
using namespace std;
struct node {
  int val;
  int num;
};
bool cmp(const node &a, const node &b) {
  if (a.val != b.val) return a.val < b.val;
  return a.num < b.num;
}
int main() {
  int n, w;
  while (cin >> n >> w) {
    node a[105];
    for (int i = 0; i < n; i++) {
      cin >> a[i].val;
      a[i].num = i;
    }
    sort(a, a + n, cmp);
    int sum = 0, need = 0, t;
    bool flag = true;
    vector<int> vec;
    for (int i = 0; i < n - 1; i++) {
      t = a[i].val % 2 == 0 ? a[i].val / 2 : a[i].val / 2 + 1;
      need = max(need, t);
      sum += need;
      vec.push_back(need);
      if (sum > w) {
        flag = false;
        break;
      }
    }
    t = a[n - 1].val % 2 == 0 ? a[n - 1].val / 2 : a[n - 1].val / 2 + 1;
    need = max(t, need);
    sum += need;
    vec.push_back(need);
    if (sum > w)
      flag = false;
    else if (sum < w) {
      int del = w - sum;
      int pn = n - 1;
      while (del) {
        int del2 = a[pn].val - vec[pn];
        if (del2 >= del) {
          vec[pn] += del;
          del = 0;
        } else {
          vec[pn] += del2;
          pn--;
          del -= del2;
        }
      }
    }
    if (!flag)
      cout << "-1" << endl;
    else {
      int ans[105];
      for (int i = 0; i < n; i++) ans[a[i].num] = vec[i];
      for (int i = 0; i < n - 1; i++) cout << ans[i] << ' ';
      cout << ans[n - 1] << endl;
    }
  }
}
