A certain gacha addicted person decides to make wishes in their favourite gacha game every day for consecutive days. However, they want to make queries to figure out how many wishes they have made in a given range of days in . Finally, they also want to find the number of guaranteed 5 stars (every 90 wishes) and 4 stars (every 10 wishes), respectively, that they would have already pulled from the beginning to this point.
Input Specification
The first line will contain two space-separated integers and .
The second line will contain space-separated integers .
The next lines will contain two space-separated integers and , representing the range of days, inclusive.
Output Specification
Print out lines of output with three space-separated integers, representing the sum of wishes in the range , the number of guaranteed 5 stars in the range , and the number of guaranteed 4 stars in the range .
Sample Input
8 3
0 3 1 4 1 5 9 2
2 3
6 6
1 8
Sample Output
4 0 0
5 0 1
25 0 2
Comments