408415: GYM103115 I chino with mates
Description
Chino held a blind date event, there are n male guests and m female guests attending.
The personality characteristic value of each person can be represented by an integer, the personality characteristic value of the i-th male guest is $$$a_i$$$, and the personality characteristic value of the j-th female guest is $$$b_j$$$.
Chino believes that when the calculation result of the personality characteristic values of two people $$$a_i \times b_j$$$ in a certain range [l,r], the personality of two person is suitable each of them.
Chino would like to know how many matching combinations possible satisfied personality suitability between male and female guests.
InputThe first line contain two positive integers $$$n,m(1 \leq n,m \leq 10^5)$$$
The next line contain n integers $$$a_i(-10^9 \leq a_i \leq 10^9)$$$ indicates the personality characteristic value of the male guests.
Then the next line contain m integers$$$b_i(-10^9 \leq b_i \leq 10^9)$$$ indicates the personality characteristic value of the female guests.
the final line only contain two integers $$$l,r(-10^9 \leq l \leq r \leq 10^9)$$$
OutputOutput an integer on a line to indicate the number of matching combinations.
ExamplesInput5 5 1 2 3 4 5 1 2 3 4 5 1 20Output
24Input
3 4 -1 -3 -5 -7 -6 -8 -9 9 9Output
1Note
For the first example, except that the male guest 5 and the female guest 5 do not meet the conditions, the other conditions are all legal, so the answer is 25-1=24
For the second example, there is only a legal matching combination for male guest 1 and female guest 4.