#include <bits/stdc++.h>
using namespace std;
const long long maxN = 2e5 + 12;
const long long INF = 1e18 + 12;
const long long Inf = 1e9 + 12;
const long long mod = 1e9 + 7;
long long n, k = 1, y, a[maxN], sum, w, ans[maxN];
vector<pair<long long, long long> > v;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] % 2) k--, ans[i]++;
    k -= a[i] / 2;
    ans[i] += a[i] / 2;
  }
  if (k < 0) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 1; i <= n; i++) {
    v.push_back({a[i], i});
  }
  sort(v.begin(), v.end());
  for (long long i = v.size() - 1; i >= 0; i--) {
    if (k <= v[i].first / 2) {
      ans[v[i].second] += k;
      k = 0;
    } else {
      ans[v[i].second] = v[i].first;
      k -= v[i].first / 2;
    }
  }
  for (long long i = 1; i <= n; i++) cout << ans[i] << ' ';
}
