Who wasn't allowed to compete in Ancient Greece Olympics?

Women. They weren't even allowed to watch.