#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double EPS = 1e-9;
const int MOD = 1000003;
const int INF = 1000000000;
const long long LINF = 1000000000000000000LL;
int c3 = 0, c4 = 0, c5 = 0;
inline int f(int k3, int k4, int k5) {
  return abs(c3 * k3 - c4 * k4) + abs(c4 * k4 - c5 * k5);
}
int main() {
  int n, s, x, ret = INF, k3, k4, k5;
  scanf("%d %d", &n, &s);
  for (int i = int(1); i <= int(n); i++) {
    scanf("%d", &x);
    if (x == 3)
      c3++;
    else if (x == 4)
      c4++;
    else
      c5++;
  }
  for (int i = s / n; i >= 0; i--)
    for (int j = (s - c3 * i) / (n - c3); j >= i; j--) {
      int k = (s - i * c3 - j * c4) / c5;
      if (k * c5 - j * c4 >= ret) break;
      if (i * c3 + j * c4 + k * c5 == s && f(i, j, k) < ret)
        ret = f(i, j, k), k3 = i, k4 = j, k5 = k;
    }
  if (ret == INF)
    puts("-1");
  else
    printf("%d %d %d\n", k3, k4, k5);
  return 0;
}
