https://5dok.net/document/ky6r4vny-nonnegative-roots-of-the-unit-matrix.html