Solution (source code)

= Solution

\b[Yes: at least one factor <topology> must be indiscrete.] Suppose instead that both have a nonempty proper <open set>, say $\varnothing\ne U\subsetneq X$ and $\varnothing\ne V\subsetneq Y$. Then
$$
W=(U\times Y)\cup(X\times V)
$$
is open in the <product topology>. Both coordinate projections of $W$ are the full factors, because $U,V$ are nonempty. If $W$ were a rectangle $A\times B$, this would force $A=X$, $B=Y$, hence $W=X\times Y$. But choosing $x\notin U$ and $y\notin V$ gives $(x,y)\notin W$, a contradiction. Thus both factors cannot have nontrivial <open sets>. This is <rectangularity of every product-open set>.