#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
int main() {
  int n, k, i, sum = 0, x;
  cin >> n >> k;
  vector<pair<int, int>> v;
  int fill[n];
  for (i = 0; i < n; i++) {
    cin >> x;
    v.push_back(make_pair(x, i));
  }
  sort(v.begin(), v.end());
  for (i = 0; i < n; i++) {
    if (v[i].first % 2 == 0)
      fill[i] = v[i].first / 2;
    else
      fill[i] = (v[i].first + 1) / 2;
    sum += fill[i];
  }
  if (sum > k) {
    cout << -1;
    return 0;
  }
  sum = k - sum;
  for (i = n - 1; i >= 0; i--) {
    if (v[i].first - fill[i] >= sum) {
      fill[i] += sum;
      break;
    } else {
      sum -= (v[i].first - fill[i]);
      fill[i] = v[i].first;
    }
  }
  for (i = 0; i < n; i++) v[i].first = fill[i];
  sort(v.begin(), v.end(), sortbysec);
  for (i = 0; i < n; i++) cout << v[i].first << " ";
  return 0;
}
