//https://ncode.syosetu.com/n4830bu/245/
#include <bits/stdc++.h>
using namespace std;

using Real = double;
using Point = complex<Real>;
#define x real()
#define y imag()
const Real EPS = 1e-8, PI = acos(-1);

Real cross(const Point& a, const Point& b) {
    return a.x * b.y - a.y * b.x;
}

struct Line {
    Point a, b;
    Line(Point a, Point b) : a(a), b(b) {}
};
struct Segment : Line {
    Segment(Point a, Point b) : Line(a, b) {}
};

bool intersect(const Line& l, const Segment& s) {
    return cross(l.b - l.a, s.a - l.a) * cross(l.b - l.a, s.b - l.a) < EPS;
}

int main() {
    int N;
    cin >> N;
    vector<Segment> segments;
    for (int i = 0; i < N; i++) {
        Real a, b, c, d;
        cin >> a >> b >> c >> d;
        segments.push_back({{a, b}, {c, d}});
    }
    vector<Line> lines;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < i; j++) {
            lines.push_back({segments[i].a, segments[j].a});
            lines.push_back({segments[i].a, segments[j].b});
            lines.push_back({segments[i].b, segments[j].a});
            lines.push_back({segments[i].b, segments[j].b});
        }
    }
    int ans = 1;
    for (auto&& l : lines) {
        if (l.a == l.b)
            continue;
        int maine = 0;
        for (auto&& s : segments) {
            maine += intersect(l, s);
        }
        ans = max(ans, maine);
    }
    cout << ans << endl;
}