Seems to me that you just have to solve a whole bunch of equations for a set of solutions.. I'd recommend using Maple or Mathematica or the like.
please see the picture.
there you will see that:
the sum of the first column is 10. the second, 80; the third 98 and so on.
the sum of the first row is 65, and so on.
the sum of all the cells is 264.
now, how do i get the value for each cell? what is the formula?