#include <bits/stdc++.h>
using namespace std;
int a[110], b[110], c[110];
bool cmp(int i, int j) { return a[i] < a[j]; }
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int s = 0, t = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    c[i] = i;
    s += (a[i] + 1) / 2;
    t += a[i];
  }
  if (s > m || t < m) {
    puts("-1");
    return 0;
  }
  m -= s;
  for (int i = 0; i < n; i++) {
    b[i] = (a[i] + 1) / 2;
  }
  sort(c, c + n, cmp);
  if (m)
    for (int i = n - 1; i >= 0; i--) {
      int j = c[i];
      if (b[j] < a[j] && m > 0) {
        if (m > a[j] - b[j]) {
          m -= a[j] - b[j];
          b[j] = a[j];
        } else {
          b[j] += m;
          m = 0;
        }
      }
      if (m == 0) {
        break;
      }
    }
  for (int i = 0; i < n; i++) {
    printf("%d ", b[i]);
  }
  puts("");
}
