You are given the following:
Find the number of pairs of (i,j) such that:
Note: Assume 1-based indexing.
Input
Output format
For each test case, print the number of pairs (i,j) that satisfy the conditions in a new line.
Constraints
1≤T≤101≤N≤1051≤X,Y≤1060≤A[i],B[i]≤106
Approach