  We show that for any finite set $A$ and an arbitrary $\varepsilon>0$ there is
$k=k(\varepsilon)$ such that the higher energy ${\mathsf{E}}_k(A)$ is at most
$|A|^{k+\varepsilon}$ unless $A$ has a very specific structure. As an
application we obtain that any finite subset $A$ of the real numbers or the
prime field either contains an additive Sidon--type subset of size
$|A|^{1/2+c}$ or a multiplicative Sidon--type subset of size $|A|^{1/2+c}$.
