What needed to happen before farmers were able to barter their crops for products that were not related to agriculture?

invention of cuneiform
specialization of labor
invention of the wheel
specialization of schools