#include <bits/stdc++.h>
using namespace std;
struct edge {
  int src, dst;
};
int const MOD = 1000000007;
long long _MOD = 1000000009;
double EPS = 1e-9;
long long INF = LLONG_MAX / 2;
int main() {
  int N, w;
  cin >> N >> w;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  vector<int> b(N);
  int sum = 0;
  for (int i = 0; i < N; i++) {
    b[i] = (a[i] + 1) / 2;
    sum += b[i];
  }
  if (sum > w) {
    cout << -1 << endl;
    return 0;
  }
  vector<pair<int, int> > ai(N);
  for (int i = 0; i < N; i++) ai[i] = pair<int, int>(a[i], i);
  sort(ai.rbegin(), ai.rend());
  for (int t = 0; t < N; t++) {
    int i = ai[t].second;
    int d = min(a[i] - b[i], w - sum);
    b[i] += d;
    sum += d;
  }
  for (int i = 0; i < N; i++) cout << b[i] << ' ';
  cout << endl;
}
