#include #include #include using namespace std; #define rep(i,n) for(int i=0;i Point; Point operator - (PCR a, PCR b){ return Point(a.X-b.X, a.Y-b.Y); } Real dot(PCR a, PCR b){ return a.X * b.X + a.Y*b.Y; } Real cross(PCR a, PCR b){ return a.X*b.Y - a.Y*b.X; } Real norm(PCR a){ return a.X*a.X + a.Y*a.Y; } bool operator == (PCR a, PCR b){ return norm(a-b) < EPS; } bool intersect(PCR l0, PCR l1, PCR s0, PCR s1){ return cross(l1-l0, s0-l0)*cross(l1-l0, s1-l0) < EPS; } int main(){ int n; cin >> n; Point p[110], q[110]; Point r[220]; rep(i,n){ cin >> p[i].X >> p[i].Y >> q[i].X >> q[i].Y; r[i*2] = p[i], r[i*2+1] = q[i]; } sort(r,r+n*2); int m = unique(r,r+n*2) - r; int ans = -1; rep(i,m)rep(j,i){ int cnt = 0; rep(k,n){ if(intersect(r[i],r[j],p[k],q[k])) cnt++; } ans = max(ans,cnt); } cout << ans << endl; }