def is_opposit(p0,p1,p2,p3): x0,y0 = p0; x1,y1 = p1; x2,y2 = p2; x3,y3 = p3 if ((x0-x1)*(y2-y0)+(y0-y1)*(x0-x2))*((x0-x1)*(y3-y0)+(y0-y1)*(x0-x3)) > 0: return False else: return True def is_crossed(p0,p1,p2,p3): return is_opposit(p0,p1,p2,p3) and is_opposit(p2,p3,p0,p1) n = int(input()) pts = [] lines = [] for _ in range(n): a,b,c,d = map(int,input().split()) lst = [(a,b),(c,d)] pts += lst lines += [lst] ans = 0 L = len(pts) for i in range(L): for j in range(i+1,L): if pts[i] == pts[j]: continue v = sum(is_crossed(pts[i],pts[j],p,q) for p,q in lines) ans = max(v,ans) print(ans)