#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> m1, m2;
map<long long int, long long int>::iterator itr, itr1, itr2;
bool cmp(const pair<long long int, long long int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int w;
  cin >> w;
  vector<pair<long long int, long long int> > v;
  long long int x;
  for (long long int i = 0; i < n; i++) {
    cin >> x;
    v.push_back(make_pair(x, i));
  }
  sort(v.begin(), v.end());
  long long int sum = 0;
  vector<pair<long long int, long long int> > ans;
  for (long long int i = 0; i < v.size(); i++) {
    long long int z = v[i].first / 2;
    if (2 * z != v[i].first) z++;
    sum += z;
    ans.push_back(make_pair(z, v[i].second));
  }
  if (sum > w)
    cout << "-1";
  else {
    w -= sum;
    for (long long int i = n - 1; i >= 0; i--) {
      long long int dif = v[i].first - ans[i].first;
      if (dif <= w) {
        ans[i].first = v[i].first;
        w -= dif;
      } else {
        ans[i].first += w;
        break;
      }
    }
    sort(ans.begin(), ans.end(), cmp);
    for (long long int i = 0; i < n; i++) cout << ans[i].first << " ";
  }
  cout << endl;
  return 0;
}
