Removed degenerate triangles from magic squares output