#include <bits/stdc++.h>
using namespace std;
int n, w;
vector<pair<int, int>> arr;
vector<int> _arr;
unordered_map<int, int> mp, freq;
int sum;
int main() {
  cin >> n >> w;
  for (int i = 0, a; i < n; ++i) {
    cin >> a;
    arr.push_back({a, i});
    sum += ceil(a / 2.0);
  }
  if (sum > w) return cout << "-1\n", 0;
  sort(arr.begin(), arr.end());
  _arr.resize(n);
  for (int i = 0, a; i < n; ++i) {
    a = ceil(arr[i].first / 2.0);
    if (w >= a) {
      _arr[arr[i].second] = a;
      w -= a;
    } else
      return cout << "-1\n", 0;
  }
  int i = n - 1;
  while (w != 0) {
    if (w >= arr[i].first - _arr[arr[i].second]) {
      w -= arr[i].first - _arr[arr[i].second];
      _arr[arr[i].second] += arr[i].first - _arr[arr[i].second];
    } else {
      _arr[arr[i].second] += w;
      break;
    }
    i--;
  }
  for (int a : _arr) cout << a << ' ';
  cout << '\n';
  return 0;
}
