For example, \begin{equation} Y_1= \begin{cases} x & \text{with prob. } p\\ 1-x & \text{with prob. } 1-p \end{cases} \end{equation} and \begin{equation} Y_2=\begin{cases} x & \text{with prob. } 2p-1\\ 0 & \text{with prob. } 1-p\\ 1 & \text{with prob. } 1-p \end{cases} \end{equation}
where $x\in\{0,1\}$ and $p\in(\frac{1}{2},1)$.
We can look at conditional distributions $P(Y_i|x)$.
$Y_1$ is already in this form: \begin{align} P(Y_1=x)&=p\\ P(Y_1=1-x)&=1-p\\ \end{align}
Thus we focus on $Y_2$. It is easy to see that $P(Y_2=x)$ is equivalent to the cases \begin{align} P(Y_2=0 \wedge x=0)&=\underbrace{(2p-1)}_{Y_2=x}+\underbrace{(1-p)}_{Y_2=0\text{ regardless of }x}=p\\ P(Y_2=1 \wedge x=1)&=\underbrace{(2p-1)}_{Y_2=x}+\underbrace{(1-p)}_{Y_2=1\text{ regardless of }x}=p\\ \end{align} and thus $P(Y_2=x)=p$.
Similarly, for $P(Y_2=1-x)$ we have two cases: \begin{align} P(Y_2=0 \wedge x=1)&=\underbrace{(1-p)}_{Y_2=0\text{ regardless of }x}=1-p\\ P(Y_2=1 \wedge x=0)&=\underbrace{(1-p)}_{Y_2=1\text{ regardless of }x}=1-p \end{align} and so $P(Y_2=1-x)=1-p$.
Therefore, $Y_1$ and $Y_2$ follow the same distribution.