A profiler collects n latency samples. Given a threshold p, classify every sample into one of three bands: below p, exactly p, or above p. Report the size of each band.
This is the classic three-way (Dutch national flag) partition: conceptually the samples are rearranged into [below | equal | above], and you output the three band sizes.
Input format
Line 1: two integers n and p.
Line 2: n space-separated integers, the samples.
Output format
Three space-separated integers on one line: the count of samples below p, equal to p, and above p, in that order.
Constraints
- 1 ≤ n ≤ 100000
- -1000000000 ≤ p, each sample ≤ 1000000000