#include <bits/stdc++.h>
using namespace std;
const int inf = 2139062143;
int c[3], n, s, con, lunasa, merlin, lyrica, ans = inf;
int main() {
  cin >> n >> s;
  for (int i = 0, x; i < n; ++i) cin >> x, c[x - 3]++;
  for (int i = s / n; i >= 0; --i)
    for (int j = (s - i * c[0]) / (c[1] + c[2]); j >= i; --j) {
      int marisa = s - i * c[0] - j * c[1];
      if (i * c[0] - j * c[1] > ans) break;
      int reimu = marisa / c[2];
      if (reimu * c[2] - j * c[1] > ans) break;
      if (reimu * c[2] + i * c[0] + j * c[1] == s &&
          abs(reimu * c[2] - j * c[1]) + abs(j * c[1] - i * c[0]) < ans) {
        ans = abs(reimu * c[2] - j * c[1]) + abs(j * c[1] - i * c[0]);
        lunasa = i, merlin = j, lyrica = reimu;
      }
    }
  if (ans == inf)
    cout << -1 << endl;
  else
    cout << lunasa << ' ' << merlin << ' ' << lyrica << endl;
  return 0;
}
