On the relation between the Einstein-Podolsky-Rosen paradox and the problem of nonlocality in quantum mechanics