Thanos just finished his relief work.
We all know that Thanos loves balanced things. So he finds something to be balanced in his relief work. He wants to know how many Balanced Relief Pair are possible in the relief work.
The Balanced Relief Pair is a pair where one is male and another one is female, And the summation of their relief unit is in the range L to R inclusive.
For example: suppose there are 3 males and 2 females. Relief units of males and females are and respectively, And the range is . For this example the Balanced Relief Pairs are , and , so the answer for this example is 3.
Input starts with two integers and () denoting the numbers of males and females people. The second line contains integers () of them is the relief units for -th male people. The third line contains integers () of them is the relief units for -th female people. The fourth line contains two integers and () denoting the range.
Print a single integer denoting the number of balanced relief pair.
Input | Output |
---|---|
3 3 6 1 6 5 3 2 8 16 | 6 |