Gold Drid - How should i approach

Can you please give me some hint that how should i approach this problem

All you need to do is find a point (x,y) about which you can divide the given grid in 4 parts.
You can pre-compute number of gold coins till ith row and jth column in 2 DP arrays.
Then just run 2 for loops for i and j to find best possible answer.