The Hales-Jewett theorem is one of the pillars of Ramsey theory, from which many other results follow. A celebrated theorem of Shelah says that Hales-Jewett numbers are primitive recursive. A key tool used in his proof, now known as the cube lemma, has become famous in its own right. In its simplest form, this lemma says that if we color the edges of the Cartesian product K_n x K_n in r colors, then, for n sufficiently large, there is a rectangle with both pairs of opposite edges receiving the same color. Shelah’s proof shows that [equation; see abstract in PDF for details] suffices. More than 20 years ago, Graham, Rothschild, and Spencer asked whether this bound can be improved to a polynomial in r. We show that this is not possible by pro...