Remember that
$$\left(\sum_{i=1}^na_i^x\right)^y\ge\left(\sum_{i=1}^na_i^y\right)^x$$
iff
$$\left(\sum_{i=1}^na_i^x\right)^{1/x}\ge\left(\sum_{i=1}^na_i^y\right)^{1/y}$$
by taking $xy$-th root.