# 交差判定には外積を使うんだったよなー、と思って解説を見た。 N=int(input()) A=[tuple(map(int,input().split())) for i in range(N)] def outer_product(x,y,z,w): return x*w-y*z ANS=0 for x,y,_,_ in A: for _,_,z,w in A: if x==z and y==w: continue score=0 for p,q,r,s in A: if outer_product(z-x,w-y,p-x,q-y)*outer_product(z-x,w-y,r-x,s-y)<=0: score+=1 ANS=max(ANS,score) for x,y,_,_ in A: for z,w,_,_ in A: if x==z and y==w: continue score=0 for p,q,r,s in A: if outer_product(z-x,w-y,p-x,q-y)*outer_product(z-x,w-y,r-x,s-y)<=0: score+=1 ANS=max(ANS,score) print(ANS)