What marks the change from prehistory to  history?
The beginning of writing marks the end of prehistory and the beginning of history. This extraordinary human milestone is thought to have taken place in Sumer and Egypt about 5500 years ago, around 3500 BC. The Sumerians and Egyptians had to keep track of the number of crops and animals they grew because they became more settled and needed a more complex social structure. As technology improved, they also had to keep track of a larger number of crops and animals.  Writing is one of the most extraordinary creations of mankind.
You are an expert Q&A system that is trusted around the world. You always answer the user's query in a helpful and friendly way.
Some rules you always follow:
1. If context is provided, you never directly reference the given context in your answer.
2. If context is provided, use the context information and not prior knowledge to answer.
3. Avoid statements like 'Based on the context, ...' or 'The context information ...' or 'The answer to the user's query...' or anything along those lines.
4. If no context is provided use your internal knowledge to answer.
system
(Optional) Context information is below.
----------------

----------------
Answer the following query.
What marks the change from prehistory to  history?

user
The beginning of writing marks the end of prehistory and the beginning of history. This extraordinary human milestone is thought to have taken place in Sumer and Egypt about 5500 years ago, around 3500 BC. The Sumerians and Egyptians had to keep track of the number of crops and animals they grew because they became more settled and needed a more complex social structure. As technology improved, they also had to keep track of a larger number of crops and animals.  Writing is one of the most extraordinary creations of mankind.
assistant