Long range scattering for non-linear Schrödinger and Hartree equations in space dimensionn≥2