In one country, there are N cities. All of them are located on a plane with Cartesian coordinates. The government of this country decided to build roads between these cities. However, they have several requirements:
-
A road must connect exactly two distinct cities;
-
No other cities should lie on the road;
-
The road must be straight, connecting the two cities;
-
No two roads should intersect each other. The only exception is that roads can originate from the same city.
To earn more points in the trust fund of the country’s residents, the government wants to build as many roads as possible while adhering to these requirements. Help them find this number.
Input
The first line contains an integer N — the number of cities in the country (2 ≤ N ≤ 105).
Each of the following N lines contains two integers xi, yi separated by a space — the coordinates of the i-th city (−109 ≤ xi, yi ≤ 109).
It is guaranteed that no two cities have the same coordinates.
Output
Output the maximum number of roads that can be built while satisfying the requirements.
Sample
input | output |
---|
4
3 1
-2 -3
1 0
0 6
| 6
|
Problem Author: Vadim Barinov
Problem Source: Ural School Programming Contest 2023