Here is my solution: https://codeforces.me/contest/1436/submission/131680312
For all the numbers in the test case, the sum I get for the rows and columns is a prime number, but it still fails. Any help is appreciated.
2-5 3-11 4-19 5-29 6-41 7-55 8-71 9-89 10-109 100-10099