Art Class
InterviewTime limit1sMemory limit1024 MB
Given N points above the x-axis, count the distinct intersection points of the slope +1 and slope -1 lines drawn through them, on or above the axis.
Problem
Changha won the subject excellence award for the final project of his art class the year before last. He drew the following picture.
- Prepare an empty two-dimensional coordinate plane.
- Choose points . Here .
- Draw a line representing the -axis.
- For each , draw two lines through the point with slopes and . Do not draw the parts below the -axis.
The example drawing is shown below.

Eric thinks the secret of the award is the beautiful harmony of the intersection points in the drawing. He wants to count the distinct intersection points in Changha's drawing. Lines that overlap completely count as one line.
Input
The first line contains an integer .
Each of the next lines contains two integers and , separated by a space.
Output
Print the number of distinct intersection points in Changha's drawing.