Which of the following inventions most directly allowed ancient farmers to produce a surplus?

irrigation

writing systems

standardized currency

the archway