#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, w;
  cin >> n >> w;
  vector<pair<int, int> > v;
  int a[n], sum = 0;
  for (int i = 0; i < n; i++)
    cin >> a[i], sum += ceil(a[i] / 2.0), v.push_back(make_pair(a[i], i));
  if (w < sum) return cout << -1 << endl, 0;
  int ans[n], temp;
  memset(ans, 0, sizeof(ans));
  for (int i = 0; i < n; i++) ans[i] = ceil(a[i] / 2.0), w -= ceil(a[i] / 2.0);
  sort(v.rbegin(), v.rend());
  for (int i = 0; i < n; i++) {
    temp = v[i].second;
    ans[temp] += min(a[temp] / 2, w), w -= min(a[temp] / 2, w);
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
long long choose(long long n, long long k) {
  if (k == 0) return 1;
  return (n * choose(n - 1, k - 1)) / k;
}
bool isprime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int power(int x, int y, int p) {
  int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
