Inexperienced preys know when to flee or to freeze in front of a threat