Good pairs#9642

Good pairs

1 second
128 megabytes
Medium

You are given two arrays, and , each containing integers. A pair of indices and j~(i < j) is called good if the following inequality holds:

a_i + a_j > b_i + b_j

Find the number of such good pairs of indices.

Input

The first line contains a single integer n~(n \le 10^5). The second line contains integers — the elements of array . The third line contains integers — the elements of array . It is guaranteed that 0 \le a_i, b_i \le 10^9.

Output

Print a single integer — the number of good index pairs.

Examples

Example 1

Loading
Loading