Let $X$ and $Y$ be topological space and let be $\sim_X$ and $\sim_Y$ the corresponding equivalence relations on $X$ and $Y$. Let $f\colon X\to Y$ an homeomorphism, suppose we are in the following hypotheses
$$x\sim_Xy\iff f(x)\sim_Y f(y)$$
Question Can we conclude that $$X/\sim_X\;\simeq\;Y/\sim_Y$$ If yes, can the hypotheses be weakened?
Thanks!