#include using namespace std; using ll = long long; #define all(A) A.begin(),A.end() using vll = vector; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll N; cin>>N; vector A(N,vll(5)); rep(i,N)rep(j,5)cin>>A[i][j]; ll an=0; rep(i,N){ ll an=0; rep(j,N){ ll ka=0; rep(k,5){ ka+=abs(A[i][k]-A[j][k]); } an=max(an,ka); } cout<