Description
Input
Output
Sample Input 1
Sample Output 1
1 4 1 10 0 0
2 3
Ans