const solution = (data) => {
let answer = Number.MIN_SAFE_INTEGER;
let raw = column = diagonal = reDiagonal = 0;
for(let i=0; i<data.length; i++) {
raw = column = 0;
diagonal += data[i][i];
reDiagonal += data[i][data.length-1-i];
for(let j=0; j<data.length; j++) {
raw += data[i][j];
column += data[j][i];
}
answer = Math.max(answer, raw, column);
}
answer = Math.max(answer, diagonal, reDiagonal);
return answer;
}