#include #include #include #include #include #include #include using namespace std; long long n,x1,y1,x2,y2,x3,y3; vector z; double dist(long long x1, long long y1, long long x2, long long y2) { return (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1); } int main() { //ifstream cin; //ofstream cout; //cin.open(".in"); //cout.open(".out"); freopen("tri.in","r",stdin); freopen("tri.out","w",stdout); scanf("%lld",&n); for(int i=1; i<=n; i++) { scanf("%lld%lld%lld%lld%lld%lld",&x1,&y1,&x2,&y2,&x3,&y3); if(dist(x1,y1,x2,y2)==dist(x1,y1,x3,y3)) { z.push_back(dist(x1,y1,x2,y2)/dist(x2,y2,x3,y3)); } else if(dist(x1,y1,x2,y2)==dist(x2,y2,x3,y3)) { z.push_back(dist(x1,y1,x2,y2)/dist(x1,y1,x3,y3)); } else if(dist(x3,y3,x2,y2)==dist(x1,y1,x3,y3)) { z.push_back(dist(x3,y3,x2,y2)/dist(x2,y2,x1,y1)); } } sort(z.begin(),z.end()); if(z.size()==0) {printf("%lld\n",0); return 0;} double p=z[0]; long long br=1,max1=0; int m=z.size(); for(int i=1; i<=m-1; i++) { if(z[i]==z[i-1]) {br++;} else {max1=max(max1,br); br=1;} } max1=max(max1,br); printf("%lld\n",max1); //cin.close(); //cout.close(); return 0; }