#include <bits/stdc++.h>
using namespace std;
struct node {
  int a;
  int b;
  int c;
} x[105];
int cmp1(node p, node q) { return p.b > q.b; }
int cmp2(node p, node q) { return p.a < q.a; }
int main() {
  int n, m, sum = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> x[i].b;
    x[i].a = i;
    x[i].c = (x[i].b + 1) / 2;
    sum += x[i].c;
  }
  if (sum > m) {
    cout << -1 << endl;
    return 0;
  }
  sort(x + 1, x + n + 1, cmp1);
  int y;
  y = m - sum;
  for (int i = 1; i <= n; i++) {
    if (y > x[i].b - x[i].c) {
      y -= x[i].b - x[i].c;
      x[i].c = x[i].b;
    } else {
      x[i].c = x[i].c + y;
      y = 0;
      break;
    }
  }
  sort(x + 1, x + n + 1, cmp2);
  for (int i = 1; i <= n; i++) {
    cout << x[i].c << " ";
  }
  cout << endl;
  return 0;
}
