Maybe because it intention is to be silent and say nothing? 
Maybe you should stop reading and start thinking …
about what ‘say’ example input and example output?
Example in problem:
First case #:
2 2 <-- dimensions of database [matrix 2x2]
1 2
3 4
1 1 1 2 2 1 2 2 <-- queryies [1][1], [1][2], [2][1], [2][2]
Answers for queries:
1
2
3
4
#
Second case ##:
2 2 2 <-- dimensions of database [cube 2x2x2]
10 9
8 7
6 5
2 1
2 2 2 <- one query [2][2][2]
Answer:
2 [edit , my mistake, answer is 1]
##
Third case ###:
1 2 6 <-- dimensions of database [cube 1x2x6 == one matrix 2x6]
1 2 3 4 5 6
6 5 4 3 2 1
1 1 1 1 2 1 <-- two queries: [1][1][1], [1][2][1]
Answers:
1
6
###
Databases in problem, can be from 2 dimensions [matrix] to 10 dimensions data structure.