Genesis 38:27-30 Young's Literal Translation (YLT)
27 And it cometh to pass in the time of her bearing, that lo, twins [are] in her womb;
28 and it cometh to pass in her bearing, that [one] giveth out a hand, and the midwife taketh and bindeth on his hand a scarlet thread, saying, `This hath come out first.'
29 And it cometh to pass as he draweth back his hand, that lo, his brother hath come out, and she saith, `What! thou hast broken forth -- on thee [is] the breach;' and he calleth his name Pharez;
30 and afterwards hath his brother come out, on whose hand [is] the scarlet thread, and he calleth his name Zarah.