Find a sufficient and complete statistic for parameters in an unobserved variable I'm struggling with the following problem:

Let $X_1, \dots, X_n$, iid, follow a Exp($\lambda$) distribution and $Y_1, \dots, Y_n$, iid, follow a Exp($\mu$) distribution. $X_i$ independent of $Y_i$ for all i.
We observe $Z_i = min(X_i,Y_i)$ and $U_i=1_{(Z_i=X_i)}$.
(i) Prove that $Z_i$ and $U_i$ are independent;
(ii) Find a sufficient and complete statistic for $(\lambda,\mu)$ based on $Z_1, \dots, Z_n$ and $U_1, \dots, U_n$

For (i) I could rewrite U as $E[P(X_i\leq Y_i)]$, which do not deppend on Z. Is it enough?
For (ii) how can I find the density of Z,U in order to find the statistics?
How do I even tackle this problem?
 A: For the distribution of Z you can start from $P(Z_i > z)$ so that:
$P(Z_i>z) = P(min\{X_i,Y_i\}>z)=P(X_i>z \,\wedge Y_i>z) $
Now, using independence of $X_i$ and $Y_i$:
$P(Z_i>z) = P(X_i>z)P(Y_i>z)=e^{\frac{-z}{\lambda}}e^{\frac{-z}{\mu}}=e^{-z\left(\frac{1}{\lambda}+\frac{1}{\mu}\right)}$
Concluding that:
$f_z(z) = \left(\frac{1}{\lambda}+\frac{1}{\mu}\right)e^{-z\left(\frac{1}{\lambda}+\frac{1}{\mu}\right)}$, that is, $Z_i \sim Exp\left(\frac{1}{\lambda}+\frac{1}{\mu}\right)$
For the distribution of $U_i$, as it's an indicator function, it has distrobution Bernoulli with parameter $p = P(Z_i=X_i)$. So:
$P(Z_i = X_i)=P(min\{X_i,Yi\}=X_i) = P(Y_i>X_i)$
$P(Y_i>X_i) = \int_0^\infty \int_x^\infty \frac{1}{\mu}e^\frac{-y}{\mu} dy  \, \frac{1}{\lambda}e^\frac{-x}{\lambda} dx = \int_0^\infty \frac{1}{\lambda} e^\frac{x}{\mu}e^\frac{-x}{\lambda} dx = \frac{\mu}{\mu + \lambda} $
So that $(1-p) = \frac{\lambda}{\mu+\lambda}$
Now we have everything we need to answer (i) and (ii):
(i) Look to $P(Z_i>z|U_i = u)$
$P(Z_i>z|U_i = 1) = \frac{P(Z_i>z,U_i=1)}{P(U_i=1)} = \frac{P(X_i>z,Y_i>X_i)}{P(Y_i>X_i)} = \left( \frac{\mu + \lambda}{\mu} \right) \int_z^\infty \int_x^\infty \frac{1}{\mu}e^\frac{-y}{\mu}dy \, \frac{1}{\lambda}e^\frac{-x}{\lambda}dx = e^{-z\left(\frac{1}{\mu}+\frac{1}{\lambda}\right)} = P(Z_i>z)$
$P(Z_i>z|U_i = 0) = \frac{P(Z_i>z,U_i=0)}{P(U_i=0)} = \frac{P(Y_i>z,X_i>Y_i)}{P(X_i>Y_i)} = \left( \frac{\mu + \lambda}{\lambda} \right) \int_z^\infty \int_y^\infty  \frac{1}{\lambda}e^\frac{-x}{\lambda}dx \, \frac{1}{\mu}e^\frac{-y}{\mu}dy = e^{-z\left(\frac{1}{\mu}+\frac{1}{\lambda}\right)} = P(Z_i>z)$
Thus proving that $Z_i \bot U_i$.
(ii) Note that both distributions of $Z_i \sim Exp\left(\frac{1}{\lambda}+\frac{1}{\mu}\right)$ and $U_i \sim Ber\left(\frac{\mu}{\mu + \lambda} \right) $ belong to exponential family with full rank. So $\left(\sum_{i=1}^n Z_i , \sum_{i=1}^n U_i \right)$ is a sufficient and complete statistics for $(\lambda, \mu)$
