Second-order third-order determinant for solving binary or ternary equations