#include <bits/stdc++.h>
using namespace std;
int a[105];
int f[105];
int v[105];
bool cmp(int i, int j) { return a[i] > a[j]; }
int main() {
  int n, w;
  while (cin >> n >> w) {
    int sum = 0;
    int sum2 = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      sum += a[i];
      if (a[i] % 2 == 0)
        f[i] = a[i] / 2;
      else
        f[i] = (a[i] + 1) / 2;
      sum2 += f[i];
    }
    for (int i = 0; i < n; i++) v[i] = i;
    sort(v, v + n, cmp);
    if (sum2 > w || sum < w) {
      cout << -1 << endl;
      continue;
    }
    w -= sum2;
    for (int i = 0; i < n; i++) {
      if (w > a[v[i]] - f[v[i]]) {
        w -= (a[v[i]] - f[v[i]]);
        f[v[i]] = a[v[i]];
      } else if (w <= a[v[i]] - f[v[i]]) {
        f[v[i]] += w;
        break;
      }
    }
    for (int i = 0; i < n; i++) {
      cout << f[i];
      if (i != n - 1) cout << " ";
    }
    cout << endl;
  }
}
