D. Ginger's line
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Ginger have $$$n$$$ straight lines $$$y = a_i x + b_i$$$, now Ginger wants to know how many pairs of straight lines $$$i,j(i \lt j)$$$ intersect.

Input

The first line contains a integer $$$n$$$ $$$(1 \le n \le 5 \times 10 ^ 3)$$$ indicating the number of lines.

The next $$$n$$$ lines contains two integers $$$a_i, b_i$$$ $$$(-10 ^3 \le a_i, b_i \le 10^3)$$$ indicating line $$$y = a_i x + b_i$$$.

Output

Print the pairs of intersections of lines.

Examples
Input
5
1 1
2 2
3 3
4 4
5 5
Output
10
Input
2
1 0
1 0
Output
0
Note

Note that overlapping lines do not intersect.