#include <bits/stdc++.h>
using namespace std;
double PI = acos(-1.0);
class Solution {
 public:
  vector<long long> analyze(vector<int> &nums, int x) {
    int n = nums.size();
    vector<int> cnts(n + 1, 0);
    for (int i = 0; i < n; ++i) {
      cnts[i + 1] = cnts[i] + (nums[i] < x ? 1 : 0);
    }
    vector<int> a(n + 1, 0);
    vector<int> b(n + 1, 0);
    for (int i = 0; i <= n; ++i) {
      ++a[cnts[i]];
      ++b[n - cnts[i]];
    }
    int N = 1;
    while (N < (n + 1) * 2) {
      N <<= 1;
    }
    vector<Complex> ca(N);
    vector<Complex> cb(N);
    for (int i = 0; i <= n; ++i) {
      ca[i].r = a[i];
    }
    for (int i = 0; i <= n; ++i) {
      cb[i].r = b[i];
    }
    fft(ca, 1);
    fft(cb, 1);
    for (int i = 0; i < N; ++i) {
      ca[i] = ca[i] * cb[i];
    }
    fft(ca, -1);
    vector<long long> res(n + 1, 0);
    for (int i = 0; i <= n; ++i) {
      res[i] = (long long)(ca[n + i].r + 0.5);
    }
    res[0] = 0;
    int l = 0, r = 0;
    while (l <= n) {
      r = l;
      while (r + 1 <= n && cnts[r + 1] == cnts[r]) {
        ++r;
      }
      res[0] += (0LL + r - l) * (0LL + r - l + 1) / 2;
      l = r + 1;
    }
    return res;
  }

 private:
  struct Complex {
    Complex(double rr = 0.0, double ii = 0.0) : r(rr), i(ii) {}
    double r;
    double i;
    Complex operator+(const Complex &other) {
      return Complex(r + other.r, i + other.i);
    }
    Complex operator-(const Complex &other) {
      return Complex(r - other.r, i - other.i);
    }
    Complex operator*(const Complex &other) {
      return Complex(r * other.r - i * other.i, i * other.r + r * other.i);
    }
    Complex operator*(double x) { return Complex(x * r, x * i); }
  };
  template <class T>
  void reorder(vector<T> &a) {
    int n = a.size();
    for (int i = 1, j = n / 2; i < n - 1; ++i) {
      if (i < j) {
        swap(a[i], a[j]);
      }
      int k = n / 2;
      while (j >= k) {
        j -= k;
        k >>= 1;
      }
      j += k;
    }
  }
  vector<int> reorder(int n) {
    vector<int> res(n, 0);
    int log = 0;
    while ((1 << log) < n) {
      ++log;
    }
    for (int i = 1; i < n; ++i) {
      int k = 0;
      while (((i >> k) & 1) == 0) {
        ++k;
      }
      res[i] = res[i ^ (1 << k)] | (1 << (log - 1 - k));
    }
    return res;
  }
  void fft(vector<Complex> &A, int f) {
    reorder(A);
    int n = A.size();
    int log = 0;
    while ((1 << log) < n) {
      ++log;
    }
    for (int l = 2; l <= n; l <<= 1) {
      Complex w(cos(f * 2 * PI / l), sin(f * 2 * PI / l));
      for (int j = 0; j < n; j += l) {
        Complex ww(1.0, 0.0);
        for (int k = j; k < j + l / 2; ++k) {
          auto t = ww * A[k + l / 2];
          auto u = A[k];
          A[k] = u + t;
          A[k + l / 2] = u - t;
          ww = w * ww;
        }
      }
    }
    if (f == -1) {
      for (int i = 0; i < n; ++i) {
        A[i].r /= n;
      }
    }
  }
};
int main(int argc, char **argv) {
  int n = 0, x = 0;
  scanf("%d%d", &n, &x);
  vector<int> nums(n);
  for (int i = 0, num = 0; i < n; ++i) {
    scanf("%d", &num);
    nums[i] = num;
  }
  Solution sol;
  auto res = sol.analyze(nums, x);
  for (auto c : res) {
    printf("%llu ", c);
  }
  printf("\n");
  return 0;
}
