How to prove the followng statement: the second moment is finite (i.e.  \mathbb{E}(X^2) < \infty ) iff \sum_{n=1}^{\infty} n \cdot \mathbb{P}(|X|>n)<\infty.

I would really appreciate if you could help me!