Several seasons of hot summers and cold winters have significantly damaged Farmer John's fence for cows, which are lined up in a row and consecutively numbered from to . Each cow belongs to one of three breeds: — Holsteins, — Guernseys, — Jerseys. Farmer John asks you to count the number of cows of each breed within a given range.
The first line contains two integers and q~(1 \le n, q \le 10^5).
Each of the next lines contains one integer, , or , which is the breed identifier of the corresponding cow.
The following lines describe the queries, each consisting of two integers and b~(a \le b).
For each of the queries , print a line containing three integers — the number of cows of each breed in the interval from to , inclusive.
Example 1