#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-12;
string s;
int n;
int k;
pair<int, int> a[200005];
int ans[200005];
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].first);
    ans[i] = a[i].first / 2;
    if (a[i].first & 1) {
      ans[i]++;
    }
    a[i].second = i;
    k -= ans[i];
  }
  if (k < 0) {
    printf("-1");
    return 0;
  }
  sort(a, a + n);
  reverse(a, a + n);
  for (int i = 0; i < n && k; i++) {
    int dif = abs(a[i].first - ans[a[i].second]);
    ans[a[i].second] += min(dif, k);
    k -= min(k, dif);
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
