Solve the triangular vertices problem