#include <bits/stdc++.h>
using namespace std;
mt19937 gen(time(NULL));
const long double eps = 1e-9;
const int inf = 1e9;
const int mod = 1e9 + 7;
const long long infinity = 2 * 1e18;
long long n;
pair<int, int> x[200005];
int e[200005];
int ans[200005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int w;
  cin >> n >> w;
  for (int i = 0; i < n; i++) cin >> x[i].first;
  for (int i = 0; i < n; i++) x[i].second = i;
  sort(x, x + n);
  int sum = 0;
  for (int i = 0; i < n; i++) e[i] = (x[i].first + 1) / 2, sum += e[i];
  if (sum > w) cout << -1, exit(0);
  w -= sum;
  while (w) {
    bool lift = false;
    for (int i = n - 1; i >= 0; i--) {
      if (!w) break;
      if (e[i] < x[i].first) {
        w--;
        e[i]++;
        lift = true;
      }
    }
    if (w && !lift) cout << -1, exit(0);
  }
  for (int i = 0; i < n; i++) ans[x[i].second] = e[i];
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << '\n';
}
