There are multiple test cases. The first line of the input contains an integer, indicating the number of test cases. For each test case:
The only line contains two integers, indicating the query.
For each test case output one line containing an integer, indicating the number of valid.