There is a meteor shower on the sky and there are *n* meteors. The sky can be viewed as a 2D Euclid Plane and the meteor is point on this plane. 

Fox Ciel looks at the sky. She finds out that the orbit of each meteor is a straight line, and each meteor has a constant velocity. Now Ciel wants to know: what is the maximum number of meteors such that any pair met at the same position at a certain time? Note that the time is not limited and can be also negative. The meteors will never collide when they appear at the same position at the same time.
The first line contains an integer *n* (1 ≤ *n* ≤ 1000). Each of the next *n* lines contains six integers: *t*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub>, *x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub> — the description of a meteor's orbit: at time *t*<sub class="lower-index">1</sub>, the current meteor is located at the point (*x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>) and at time *t*<sub class="lower-index">2</sub>, the meteor is located at point (*x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub>) ( - 10<sup class="upper-index">6</sup> ≤ *t*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub>, *x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub> ≤ 10<sup class="upper-index">6</sup>; *t*<sub class="lower-index">1</sub> ≠ *t*<sub class="lower-index">2</sub>). 

There will be no two meteors are always in the same position for any time.
def calculate_slope_and_intercept(x1, y1, x2, y2):
    if x1 == x2:
        return float('inf'), x1  # Infinite slope for vertical lines
    slope = (y2 - y1) / (x2 - x1)
    intercept = y1 - slope * x1
    return slope, intercept

def maximum_meteors_with_same_position(n, meteor_descriptions):
    meteor_groups = {}  # Dictionary to store meteor groups by slope and intercept

    for i in range(n):
        t1, x1, y1, t2, x2, y2 = meteor_descriptions[i]
        slope, intercept = calculate_slope_and_intercept(x1, y1, x2, y2)
        if (slope, intercept) not in meteor_groups:
            meteor_groups[(slope, intercept)] = 1
        else:
            meteor_groups[(slope, intercept)] += 1

    return max(meteor_groups.values())

# Read input
n = int(input())
meteor_descriptions = [list(map(int, input().split())) for _ in range(n)]

# Calculate and print the result
result = maximum_meteors_with_same_position(n, meteor_descriptions)
print(result)
