We call a topological space $(X,\tau)$ *product-decomposable* if there is an index set $I$ and subsets $X\_i\subseteq X$ for $i\in I$ such that $|X\_i| > 1$ and $X \cong \prod\_{i\in I} X\_i$ where each $X\_i$ is endowed with the subspace topology.


If a space $(X,\tau)$ is not product-decomposable and $|X|>1$, we call it *prime*. (Is there established terminology for this?)


If $X\_1, X\_2$ are prime spaces, is it possible that there are prime topological spaces $Y\_1, Y\_2$ such that $X\_i \not\cong Y\_j$ for $i,j\in\{1,2\}$ but $(X\_1\times X\_2) \cong (Y\_1\times Y\_2)$?



Product of "prime" topological spaces
This is just a cheap extension of PVAL's comment, but I think it works: Taking for granted that $S^2$ and $TS^2$ are prime, which I believe is true, you can write 
$$TS^2 \times (\mathbb R \amalg S^2) = S^2 \times (\mathbb R^3 \amalg TS^2),$$
and now all four spaces appearing are prime and pairwise not homeomorphic.


