


The first line contains an integer 'T' which denotes the number of test cases or queries to be run.
The first line of each test case contains two single-space separated integers ‘N’ and ‘M’ denoting the number of horizontal and vertical bars respectively.
The second line of each test case contains a single integer ‘X’ denoting the number of horizontal bars that can be removed.
The third line of each test case contains ‘X’ space-separated integers in an array ‘H’ denoting the index of horizontal bars that can be removed.
The fourth line of each test case contains a single integer ‘Y’ denoting the number of vertical bars that can be removed.
The fifth line of each test case contains ‘Y’ space-separated integers in an array ‘V’ denoting the index of vertical bars that can be removed.
For each case, we need to return the area of the largest hole in the gate after the bars are removed.
The output of each test case will be printed in a separate line.
You do not need to input or print anything, and it has already been taken care of. Just implement the given function.
1 <= T <= 5
1 <= N <= 100
1 <= M <= 100
1 <= X <= N
1 <= Y <= M
1 <= |H| <= N
1 <= |V| <= M
Time Limit : 1 sec
Here, to find out the maximum area of a hole, we need a maximum number of consecutive horizontal bars ‘maxHorizontal’ and a maximum consecutive number of vertical bars ‘maxVertical’ that are removed. Once, we can find them, as we know that ‘x’ number of horizontal bars can make ‘x’ + 1 hole free, so using this concept, our maximum hole area will be ('maxHorizonal' + 1) * ('maxVertical' + 1).