import std.stdio; import std.array; import std.string; import std.conv; import std.algorithm; import std.typecons; import std.range; import std.random; import std.math; import std.container; int N; int Pa, Pb; void main() { int N = readln.chomp.to!int; auto p = iota(N).map!(_ => readln.split.map!(to!int).array).array; int ans; int[4] e1 = [0, 0, 2, 2]; int[4] e2 = [0, 2, 0, 2]; foreach (i; 0..N) foreach (j; i+1..N) foreach (e; 0..4) { int tmp_ans; int p1x = p[i][e1[e]]; int p1y = p[i][e1[e]+1]; int p2x = p[i][e2[e]]; int p2y = p[i][e2[e]+1]; foreach (k; 0..N) { int p3x = p[k][0]; int p3y = p[k][1]; int p4x = p[k][2]; int p4y = p[k][3]; if (((p1x - p2x) * (p3y - p1y) + (p1y - p2y) * (p1x - p3x)) * ((p1x - p2x) * (p4y - p1y) + (p1y - p2y) * (p1x - p4x)) < 0) tmp_ans++; } ans = max(ans, tmp_ans+2); } writeln(ans); }