Tiresias was in a mountain and happened upon two snakes copulating, he hit them with a stick. Hera was displeased and punished Tiresias transforming him into a woman. He spent the next seven years living as a priestess of Hera. After the seventh year, Tiresias saw the same snakes mating again and made sure to let them alone. As a result, Tiresias was released from the sentence and regained his masculinity.
Years later, Zeus and Hera couldn't agree over who, men or women, find more pleasure in sex. They turned to Tiresias for the answer, since he had experienced both. "of ten parts a man enjoys one only", replied. For impiety, Hera blinded him. Zeus could do nothing, but in recompense he gave Tiresias the gift of foresight and a lifespan of seven generations.