#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int32_t main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t;
  t = 1;
  for (long long tc = 0; tc < t; tc++) {
    long long n, w, sum = 0;
    cin >> n >> w;
    vector<pair<long long, long long> > arr(n);
    vector<long long> v(n);
    for (long long i1 = 0; i1 < n; i1++) {
      cin >> arr[i1].first;
      sum += (arr[i1].first + 2 - 1) / 2;
      arr[i1].second = i1;
    }
    sort(arr.begin(), arr.end());
    reverse(arr.begin(), arr.end());
    if (sum > w) {
      cout << -1 << "\n";
      continue;
    }
    long long temp = w - sum;
    for (long long i = 0; i < n; i++) {
      v[arr[i].second] = (arr[i].first + 2 - 1) / 2;
    }
    for (long long i = 0; i < n && temp > 0; i++) {
      long long x = min(temp, abs(arr[i].first - v[arr[i].second]));
      v[arr[i].second] += x;
      temp -= x;
    }
    for (long long i = 0; i < (long long)v.size(); i++) cout << v[i] << " ";
    cout << "\n";
    ;
  }
  return 0;
}
