#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, w;
  cin >> n >> w;
  vector<int> a(n);
  vector<int> ans(n);
  int soma = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    soma += (a[i] + 1) / 2;
    ans[i] = (a[i] + 1) / 2;
    w -= ans[i];
  }
  if (w < 0) {
    cout << -1 << endl;
    return 0;
  }
  vector<int> aux = a;
  sort(aux.begin(), aux.end(), greater<int>());
  int at = 0;
  while (w > 0 and at < n) {
    auto it = find(a.begin(), a.end(), aux[at]);
    at++;
    int i = it - a.begin();
    if (a[i] - ans[i] >= w) {
      ans[i] += w;
      w = 0;
      break;
    } else {
      w -= a[i] - ans[i];
      ans[i] = a[i];
    }
    a[i] = -1;
  }
  if (w > 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
