If and or statement

Whatever operation is between parenthesis is evaluated first. Within parenthesis, operators with greater precedence evaluate first.

Your Boolean expression is sintactically correct, but I cannot say if it reflects what you want.

In this specific case (the inner) parenthesis are redundant because the and (&&) evaluates before the or (||) as && has greater precedence than ||.