N = int(input()) X = [] a, b, c, d = [-1] * N, [-1] * N, [-1] * N, [-1] * N for i in range(N): a[i], b[i], c[i], d[i] = map(int, input().split()) X.append((a[i], b[i])) X.append((c[i], d[i])) def f(x1, y1, x2, y2, x3, y3): x12 = x2 - x1 x13 = x3 - x1 y12 = y2 - y1 y13 = y3 - y1 return x12 * y13 - x13 * y12 def solve(x1, y1, x2, y2, x3, y3, x4, y4): if f(x1, y1, x2, y2, x3, y3) * f(x1, y1, x2, y2, x4, y4) > 0: return 0 return 1 ans = 0 for i in range(2 * N): for j in range(i + 1, 2 * N): x1, y1 = X[i] x2, y2 = X[j] if x1 == x2 and y1 == y2: continue val = 0 for k in range(N): val += solve(x1, y1, x2, y2, a[k], b[k], c[k], d[k]) ans = max(ans, val) print(ans)