404193: GYM101446 G Parabolas

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

G. Parabolastime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

There are n parabolas in the plane determined by equations y = (x - ai)2 + bi. Parabolas cut the plane into several parts (either finite or infinite) of positive area. Your task is to count the number of those parts.

Input

The first line of the input contains one integer n (1 ≤ n ≤ 1000) — number of parabolas. Each of the next n lines contains two integers — coefficients ai and bi (|ai| ≤ 109, |bi| ≤ 109).

Output

Print one integer — the number of positive area parts that the plane is cut into.

ExamplesInput
4
0 0
1 1
0 1
2 1
Output
10
Input
3
2 4
3 4
2 4
Output
4

加入题单

算法标签: