Electromagnetic inversion of amplitude-only data through a two-step strategy