Source: https://www.imo.universite-paris-saclay.fr/~meliot/agreg/hypercube.pdf