Can different topological spaces have the same square? For topological spaces $X$ and $Y$, is it possible that $X \times X$ and $Y \times Y$ are homeomorphic, but $X$ and $Y$ are not homeomorphic?
(I poked around with finite spaces, and manifolds, and the Cantor set, without seeing any examples.)
This was inspired by Existence of topological space which has no “square-root” but whose “cube” has a “square-root”. Cartesian product makes the proper class of topological spaces (up to homeomorphism) into a large abelian monoid, so here's a bonus question: what is known about the structure of this monoid? For example, the dogbone space shows that it is not cancellative. Does it have torsion in the sense that sometimes $X^n \not\cong X$ but $X^{n + 1} \cong X$?
 A: Copying part of my answer to this Math Overflow question:

Whether two (a) topological spaces, (b) metric spaces, or (c) groups $A$ and $B$, with isomorphic squares, are necessarily isomorphic, was Problem 77 (of Ulam) in the Scottish book. The following information is from the commentaries on Problem 77, by Mauldin for (a) and (b) and by Kaplansky for (c), in The Scottish Book: Mathematics from the Scottish Café, R. Daniel Mauldin, ed., 1981.
Mauldin gives a bibliography of 17 items for parts (a) and (b). The first counterexample for part (a), as well as a positive answer for two-dimensional compact manifolds, was given by R. H. Fox, On a problem of S. Ulam concerning Cartesian products, Fund. Math. 34 (1947), 278-287. The first counterexample to part (b) was given by G. Fournier, On a problem of S. Ulam, Proc. Amer. Math. Soc. 29 (1971), 622. Mauldin writes (in 1981):
"However, it is open whether there is an affirmative solution to (b) in the case that $A$ and $B$ are complete metric spaces. In fact, part (b) is open in the case where $A$ and $B$ are assumed to be compact."

