#include <bits/stdc++.h>
using namespace std;
const long long infll = powl(2, 63) - 1;
struct cup {
  long long a, b, c;
};
bool comp(cup x, cup y) { return x.c < y.c; }
bool cmp1(cup x, cup y) {
  if (x.a == y.a) return x.c < y.c;
  return x.a > y.a;
}
int32_t main() {
  long long n, tea;
  cin >> n >> tea;
  vector<cup> arr(n);
  for (long long i = 0; i < (long long)(n); ++i) cin >> arr[i].a;
  for (long long i = 0; i < (long long)(n); ++i) {
    arr[i].b = ceil(arr[i].a / 2.0);
    arr[i].c = i;
    tea -= arr[i].b;
    if (tea < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  sort((arr).begin(), (arr).end(), cmp1);
  for (long long i = 0; i < (long long)(n); ++i) {
    long long temp = min(tea, arr[i].a - arr[i].b);
    arr[i].b += temp;
    tea -= temp;
    if (tea == 0) break;
  }
  sort((arr).begin(), (arr).end(), comp);
  for (long long i = 0; i < (long long)(n); ++i) cout << arr[i].b << ' ';
  cout << endl;
  return 0;
}
