You are given a sequence of length . Process queries of the following form.
i j x y: Count the elements among whose remainder modulo is .The input is given in the following format:
case case
For each test case, print the answer to every query on its own line.
Each test case is given in the following format:
| 2 | 3 | for every query . |
| 3 | 11 | is the same for every query. |
| 4 | 29 | and for every query . |
| 5 | 52 | No additional constraints. |