Primeful Heterosquares
Problem: http://www.primepuzzles.net/coll20th/coll20th-003.htm (sub-problem 2.)
Forum (Russian): https://dxdy.ru/post1319514.html#p1319514
Input format: {{X,X,X,X},{X,X,X,X},{X,X,X,X},{X,X,X,X}}
Examples: {{7,9,27},{5,13,49},{1,15,3}}, {{24,83,25,59},{21,1,40,9},{3,17,44,15},{41,30,114,14}}