#include <bits/stdc++.h>
const int N = 10000;
using namespace std;
int firstalloct(int *dif, int *a, int *half, int &w, int n) {
  int i;
  for (i = 0; i < n; i++) {
    half[i] = (1 + a[i]) / 2;
    w -= half[i];
    if (w < 0) {
      printf("-1\n");
      return -1;
    }
    dif[i] = a[i] - half[i];
  }
  return 0;
}
int sequence(int *dif, int *a, int *half, int &w, int n) {
  int i, j, judge = 0, max = -1, maxi = -1;
  while (w > 0) {
    for (i = 0; i < n; i++) {
      if (dif[i] != 0 && max < a[i]) {
        max = a[i];
        maxi = i;
      }
    }
    if (dif[maxi] < w) {
      w -= dif[maxi];
      half[maxi] = a[maxi];
      dif[maxi] = 0;
    } else {
      half[maxi] = half[maxi] + w;
      w = 0;
      dif[maxi] = a[maxi] - half[maxi];
      break;
    }
    max = -1;
    maxi = -1;
    if (w == 0)
      break;
    else {
      for (i = 0; i < n; i++) {
        if (dif[i] != 0) {
          judge = 0;
          break;
        }
        judge = 1;
      }
      if (judge == 1) break;
    }
  }
  if (w != 0) {
    return -1;
  }
}
int main() {
  int i, j, n, w, s;
  int a[N], half[N], dif[N];
  scanf("%d%d", &n, &w);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  s = firstalloct(dif, a, half, w, n);
  if (s != -1) {
    s = sequence(dif, a, half, w, n);
    if (s != -1) {
      printf("%d", half[0]);
      for (i = 1; i < n; i++) printf(" %d", half[i]);
      printf("\n");
    } else
      printf("-1\n");
  }
}
