The title has it all. I'm looking for a reference to the following:
Q. Let $X, Y, Z$ be finite, non-empty (topological) spaces. When does $X \times Y \cong X \times Z$ imply $Y \cong Z$ (in the category of topological spaces)?
This is, at the end of the day, a special instance of a famous problem (concerning the cancellativity, up to iso, of direct products or other "binary operations" in all sorts of categories), originated from a question of M.S. Ulam that first appeared as Problème 56 on p. 285 of Fund. Math 20 (1933), No. 1; see also footnote 2 in R.H. Fox, On a problem of S. Ulam concerning cartesian products, Fund. Math. 27 (1947), No. 1, 278-287. But the literature is vast (even sticking to topological spaces), and I couldn't find a reference to the case in which I'm presently interested.
Let me mention that I don't have an example showing that $X \times Y \cong X \times Z$ need not imply $Y \cong Z$ in my question (to be honest, I haven't even tried to find one), though I don't believe the contrary.
Background. The point of the question is simple, so let me make it a bit more complicate, but only in the hope of also making it a little more interesting (at least from certain points of view).
Fix a non-empty universe $\mathscr U$. Let $\mathscr T$ be the class of all $\mathscr U$-small, non-empty (topological) spaces, and $\sim$ the equivalence relation on $\mathscr T$ that identifies two spaces iff they are homeomorphic. Then the quotient of $\mathscr T$ by $\sim$ is naturally made into a commutative, reduced monoid, $\mathcal M$, by endowing it with the obvious binary operation induced by the direct product of spaces.
Let $\mathcal M_{\rm fin}$ be the submonoid of $\mathcal M$ consisting of all and only the equivalence classes containing finite spaces: This is a divisor-closed, unit-cancellative submonoid of $\mathcal M$ (for terminology, see the notes at the bottom of this post), and it is straigthfoward that there is a function $\lambda: \mathcal M_{\rm fin} \to \mathbf N$ such that $\lambda(\mathsf t_1) < \lambda(\mathsf t_2)$ for all distinct classes $\mathsf t_1, \mathsf t_2 \in \mathcal M_{\rm fin}$ with $\mathsf t_1 \mid \mathsf t_2$ in $\mathcal M_{\rm fin}$ (just map each isomorphism class $\mathsf t \in \mathcal M_{\rm fin}$ to the number of elements of any space $T \in \mathsf t$). So, it follows from elsewhere that $\mathcal M_{\rm fin}$ is a BF-monoid, i.e., (i) every class is a finite product of atoms of $\mathcal M_{\rm fin}$ and (ii) the factorizations (into atoms) of a fixed class cannot be arbitrarily large. Accordingly, it's natural to ask if $\mathcal M_{\rm fin}$ is cancellative, as this would make life much easier (at least from the perspective of factorization theory, which is the motivation behind my question).
Notes. Let $H$ be a multiplicatively written monoid $H$. We say that $H$ is unit-cancellative if $xy = x$ or $yx = x$, for some $x, y \in H$, implies $y \in H^\times$, where $H^\times$ is the group of units of $H$. An element $a \in H$ is referred to as an atom if (i') $a \notin H^\times$ and (ii') $a \ne xy$ for all $x, y \in H \setminus H^\times$. Finally, a submonoid $M$ of $H$ is called divisor-closed if $x \in M$ whenever $x \mid_H y$ and $y \in M$.