#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, k3, k4, k5, c3 = 0, c4 = 0, c5 = 0, v3, v4, v5;
  cin >> n >> s;
  int mark;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &mark);
    if (mark == 3) c3++;
    if (mark == 4) c4++;
    if (mark == 5) c5++;
  }
  int s3, s4, s5, inf = 1000000;
  for (int k3 = s / n; k3 >= 0; k3--) {
    s3 = k3 * c3;
    if (abs(s - 3 * s3) / 2 > inf) continue;
    for (int k4 = (s - s3) / (c4 + c5); k4 >= k3; k4--) {
      s4 = k4 * c4, s5 = s - s3 - s4, k5 = s5 / c5;
      if (s4 <= s5 && abs(s3 - s4) + abs(s4 - s5) >= inf) break;
      if (s5 % c5) continue;
      if (k5 < k4) continue;
      if (abs(s3 - s4) + abs(s4 - s5) >= inf) continue;
      inf = abs(s3 - s4) + abs(s4 - s5);
      v3 = k3, v4 = k4, v5 = k5;
    }
  }
  if (inf == 1000000)
    puts("-1");
  else
    printf("%d %d %d\n", v3, v4, v5);
  return 0;
}
