Consider the k-variate random vector $Y\equiv (Y_1, Y_2, ..., Y_K)$ with cumulative distribution function (cdf) $F$.
How can I express in terms of $F$ the following probability: $$ \mathbb{P}(a_k\leq Y_k\leq b_k \text{ }\forall k) $$ ?
For example, if $K=2$, I know that
$$ \mathbb{P}(a_1\leq Y_1\leq b_1\text{, }a_2\leq Y_2\leq b_2)= F(a_2, b_2)+F(a_1, b_1)- F(a_1, b_2)-F(a_2, b_1) $$
(Sometimes this is also called rectangle formula)
Is there a way to generalise this to any $K>2$?
Thanks to the comment below, I now write the expression for $K=3$
1) I list all the $2^K=8$ vertices
$$ \begin{cases} a_1,a_2, a_3\\ b_1, a_2, a_3\\ a_1, b_2, a_3 \\ b_1, b_2, a_3\\ a_1,a_2, b_3\\ b_1, a_2, b_3\\ a_1, b_2, b_3 \\ b_1, b_2, b_3\\ \end{cases} $$
2) Algebraic sum of cdf at each vertex with +1 if the number of $a$'s is even and -1 otherwise
$$ \mathbb{P}(a_1\leq Y_1\leq b_1\text{, }a_2\leq Y_2\leq b_2\text{, }a_3\leq Y_3\leq b_3)= -F(a_1,a_2, a_3) +F(b_1, a_2, a_3) +F(a_1, b_2, a_3) -F(b_1, b_2, a_3) +F(a_1,a_2, b_3) -F(b_1, a_2, b_3) -F(a_1, b_2, b_3) +F(b_1, b_2, b_3) $$