The Vapnik-Chervonenkis dimension of cubes in $\mathbb{R}^d$