https://ac.nowcoder.com/acm/contest/11218/D
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int n; ll k;
cin >> n >> k;
vector a(n);
for(int i = 0; i < n; ++i) cin >> a[i];
sort(a.begin(), a.end());
int j = n - 1, p = n - 1;
ll g = 0, e = 0, s = 0;
for(int i = 0; i < n; ++i) {
while(j > i && a[j] * a[i] >= k) --j;
while(p > i && a[p] * a[i] > k) --p;
if(p == i) break;
e += p - max(j, i);
if(j >= i) s += j - i;
}
g = 1ll * n * (n - 1) / 2 - s - e;
cout << g << " " << e << " " << s << ‘\n’;
}