#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, w;
  cin >> n >> w;
  long long int arr[101];
  vector<pair<long long int, long long int>> v1;
  vector<long long int> v2(n + 1);
  v1.push_back({0, 0});
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    v1.push_back({arr[i], i});
  }
  sort(v1.begin(), v1.end());
  long long int arr1[101];
  bool flag = true;
  for (int i = 1; i <= n; i++) {
    v2[i] = (v1[i].first + 1) / 2;
    w -= v2[i];
  }
  if (w < 0) {
    flag = false;
  }
  for (int i = 2; i <= n; i++) {
    if ((v1[i - 1].first == v1[i].first) && (v2[i] < v2[i - 1])) {
      int x1 = v2[i];
      v2[i] = v2[i - 1];
      w -= (v2[i] - x1);
    }
  }
  if (w < 0) {
    flag = false;
  }
  if (w > 0) {
    for (int i = n; i >= 1; i--) {
      if (v2[i] < v1[i].first) {
        int t1 = v2[i];
        v2[i] = min(w + v2[i], v1[i].first);
        w -= (v2[i] - t1);
        if (w == 0) {
          break;
        }
      }
    }
  }
  int ans[101];
  for (int i = 1; i <= n; i++) {
    ans[v1[i].second] = v2[i];
  }
  if (flag && w == 0) {
    for (int i = 1; i <= n; i++) {
      cout << ans[i] << " ";
    }
    cout << "\n";
  } else {
    cout << -1 << "\n";
  }
}
