I Teach Sweeping

Given segments in the first quadrant, find a line through the origin that intersects the most segments and report that count.

Hard8GeometrySortingTwo pointersInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

Yeongseon teaches at an algorithm camp. While running a seminar on sweeping, she wrote one practice problem: "Given nn points at integer coordinates in the first quadrant, choose the line through the origin that has the most of those points on it, and report how many points that is." She noticed a hole in it later. Counting the points by slope solves it without any sweep.

So she turned the points into segments in a hurry to force a sweep. You are in her class, so solve the new version.

"Given nn segments at integer coordinates in the first quadrant, choose the line through the origin that crosses the most segments, and report how many segments that is."

A line that passes through only an endpoint of a segment counts as crossing it.

Input

The first line contains the number of segments nn. (1n1000001 \le n \le 100000)

Each of the next nn lines contains the coordinates of the two endpoints of one segment, x1x_1, y1y_1, x2x_2, y2y_2. (1x1,y1,x2,y21091 \le x_1, y_1, x_2, y_2 \le 10^9) The two endpoints of one segment are never the same point, and segments may cross each other.

Output

Print on one line the number of segments crossed by the line through the origin that crosses the most segments.