Polynomial trichotomy