segTree product & bisection method