Denoising and real-vs-corrupted classification as two fundamental paradigms in self-supervised learning