Home Web Board ProblemSet Standing Status Statistics
long long输出请使用 %lld服务器的python版本为3.4
Problem I: 五队-大连-Golden ratio

## Problem I: 五队-大连-Golden ratio

Time Limit: 5 Sec  Memory Limit: 128 MB
Submit: 24  Solved: 4
[Submit][Status][Web Board]

## Description

Every one knows the golden ratio, the absolute value of golden ratio is ,about 0.618
Little Dingding is drawing lines parallel to axis on an infinite large paper. Of course, lines are infinitely long. Lines may intersect and form rectangles. Now he wants to know, how many rectangles are there which has golden ratio.
If the integer part of is the same as ,we say the rectangle has the golden ratio. Of cource ,width is the longer edge.

## Input

There are multiple test cases. Given () representing the number of lines.
Followed by integers,representing the lines parallel to X-axis (in the form Y=1 etc.) and then integers,representing the lines parallel to Y-axis (). Lines won’t overlap.
Process to end of file.

## Output

For each case, print number of rectangles with the golden ratio.

## Sample Input

3 3
0 9 10
0 16 17


## Sample Output

2


## HINT

[Submit][Status][Web Board]