#include <iostream>
using namespace std;

#define REP(i,s,e) for (i = s; i <= e; i++)
#define rep(i,n) REP(i,0,(int)(n)-1)
#define ESP 1e-8

typedef pair<double,double> P;

double det(const P& p, const P& q) {
    return p.first * q.second - p.second * q.first;
}

double dot(const P& p, const P& q) {
    return p.first * q.first + p.second * q.second;
}

P operator+(P p, const P& q) {
    p.first += q.first;
    p.second += q.second;
    return p;
}

P operator-(P p, const P& q) {
    p.first -= q.first;
    p.second -= q.second;
    return p;
}

P operator*(double s, P p) {
    p.first *= s;
    p.second *= s;
    return p;
}

int main(void) {
    int i, j, k, ib, jb, n, ans;
    P x[100][2];
    cin >> n;
    rep (i,n) cin >> x[i][0].first >> x[i][0].second >> x[i][1].first >> x[i][1].second;
    ans = 0;
    rep (i,n) rep (j,n) rep (ib,2) rep (jb,2) if (x[i][ib] != x[j][jb]) {
        int cnt = 0;
        rep (k,n) {
            double a = det(x[i][ib] - x[j][jb],x[i][ib] - x[k][1]);
            double b = det(x[i][ib] - x[j][jb],x[k][0] - x[k][1]);
            if (abs(b) < ESP) {
                if (abs(a) < ESP)
                    cnt++;
            }
            else {
                P p = x[k][1] + a / b * (x[k][0] - x[k][1]);
                if (dot(x[i][ib] - p,x[j][jb] - p) < ESP && dot(x[k][0] - p,x[k][1] - p) < ESP)
                    cnt++;
            }
        }
        ans = max(cnt,ans);
    }
    cout << ans << endl;
}