  We propose and prove a new exact duality between the F-terms of
supersymmetric gauge theories in five and three dimensions with adjoint matter
fields. The theories are compactified on a circle and are subject to the Omega
deformation. In the limit proposed by Nekrasov and Shatashvili, the
supersymmetric vacua become isolated and are identified with the eigenstates of
a quantum integrable system. The effective twisted superpotentials are the
Yang-Yang functional of the relativistic elliptic Calogero-Moser model. We show
that they match on-shell by deriving the Bethe ansatz equation from the saddle
point of the five-dimensional partition function. We also show that the
Chern-Simons terms match and extend our proposal to the elliptic quiver
generalizations.
