Another matter, “it was when Pharaoh let [the people] go” – this is analogous to one who found a bundle of pearls, and he did not know what he had in his possession. He said to a particular [individual] on the road: ‘Would you like to take this bundle that is in my possession?’ He said to him: ‘Why should I take your bundle?’ He said to him: ‘Take it and I will not stand in your way,’ and he took it from him.
When he entered the city, he sat and strung together the large ones separately, the small ones separately, and the medium ones separately. The one who had given him the bundle entered the city and saw that the man who had taken it from him was displaying them outside. A person came to purchase from him and said to him: ‘How much is this small one?’ He said: ‘[Its price is] one million.’ ‘And how much is the large one?’
He said to him: ‘Ten million.’ ‘And how much is the medium one?’ He said to him: ‘Eight million.’ When he saw that, he tore his garments. He said: ‘All this wealth was in my possession and I divested myself of it for nothing.
Woe is that man that he divested himself of it in that way.’ So it was with Pharaoh; the bundle of pearls is Israel, who were under his auspices, as it is stated: “A bundle of myrrh my beloved is to me” (Song of Songs 1:13). He began screaming: “Arise and leave” (Exodus 12:31). Moses began counting them, six hundred thousand besides the tribe of Levi, whom he did not count.
When Pharaoh saw all that population he began screaming ‘woe’ [vai]. That is: “It was [vayhi] when Pharaoh let [the people] go.”