When was the earliest recorded Olympics competition held?

When was the earliest recorded Olympics competition held?