Neutron capture mechanism in 45Sc and 139La