Analytic Bethe ansatz for fundamental representations of Yangians