Let $\displaystyle f:A\times B\to\mathbb R$ bounded above, prove that $\displaystyle \underset{(x,y)\in A\times B}{\mathop{\sup }}\,f(x,y)=\underset{x\in A}{\mathop{\sup }}\,\left(\underset{y\in B}{\mathop{\sup }}\,f(x,y)\right).$

How to prove this? I think is not that easy.