Right angeld triangles hint

why we have to subtract 1 from (n1-1)*(n2-1)

because one point is pivot and we don’t have to consider this
that’s why we have to subtract one from n1 and n2