package main import ( "fmt" "bufio" "os" "strconv" ) type Point struct { X int Y int } type Vector struct { X int Y int } type Line struct{ A Point B Point } func vec(p1 Point, p2 Point) Vector { return Vector{p2.X - p1.X, p2.Y - p1.Y} } func cross(p1 Vector, p2 Vector) int { return p1.X * p2.Y - p1.Y * p2.X } func intersect(p1 Point, p2 Point, l Line) bool { return cross(vec(p1, p2), vec(p1, l.A))*cross(vec(p1, p2), vec(p1, l.B)) <= 0 } func main() { var N int fmt.Scanf("%d", &N) var p = make([]Point, 2*N) var lines = make([]Line, N) for i := 0; i < N; i++ { fmt.Scanf("%d %d %d %d", &p[2*i].X, &p[2*i].Y, &p[2*i+1].X, &p[2*i+1].Y) lines[i].A = p[2*i] lines[i].B = p[2*i+1] } mx := 0 for i := 0; i < 2*N; i++ { for j := 0; j < 2*N; j++ { if p[i] == p[j] { continue } count := 0 for k := 0; k < N; k+=1 { if intersect(p[i], p[j], lines[k]) { count+=1 } } mx = max(mx, count) } } fmt.Println(mx) } var s = bufio.NewScanner(os.Stdin) func next() string { s.Split(bufio.ScanWords) s.Scan() return s.Text() } func nextLine() string { s.Split(bufio.ScanLines) s.Scan() return s.Text() } func nextInt() int { i, e := strconv.Atoi(next()) if e != nil { panic(e) } return i } func nextLong() int64 { i, e := strconv.ParseInt(next(), 10, 64) if e != nil { panic(e) } return i } func max(a int, b int) int { if a < b { return b } return a }