Jamshid () (, Jamshēd; Middle- and New Persian: جم, Jam) also known as Yima (Avestan: 𐬫𐬌𐬨𐬀 Yima; Pashto/Dari: یما Yama) is the fourth Shah of the mythological Pishdadian dynasty of Iran according to Shahnameh. In Persian mythology and folklore, Jamshid is described as the fourth and greatest king of the epigraphically unattested Pishdadian Dynasty (before the Kayanian dynasty). This role is already alluded to in Zoroastrian scripture (e.g. Yasht 19, Vendidad 2), where the figure appears as Yima kshaeta "radiant Yima" () and from which the name 'Jamshid' is derived. Both Jam and Jamshid remain common Iranian and Zoroastrian male names that are also popular in surrounding areas of Iran such as Afghanistan and Tajikistan. Edward FitzGerald transliterated the name as Jamshyd. In the eastern regions of Greater Iran, and by the Zoroastrians of the Indian subcontinent it is rendered as Jamshed. Etymology The name Jamshid is originally a compound of two parts, Jam and shid, corresponding to the Avestan names Yima and Xšaēta, derived from the proto-Iranian *Yamah Xšaitah ('Yama, the brilliant/majestic'). Yamah and the related Sanskrit Yama are interpreted as "the twin", perhaps reflecting an Indo-Iranian belief in a primordial Yama and Yami pair. By regular sound changes (y → j, and the loss of the final syllable) an Old Persian form equivalent to Avestan Yima became Middle Persian Jam, which was subsequently continued into New Persian. There are also a few functional parallels between Avestan Yima and Sanskrit Yama; for instance, Yima was the son of Vivaŋhat, who in turn corresponds to the Vedic Vivasvat, "he who shines out", a name for the sun-god Surya. Both Yamas in Iranian and Indian myth guard Hell with the help of two four-eyed dogs. Oettinger, when talking about how the story of Yima was originally a flood myth, and how original Sanskrit flood myths had their protagonist as yama, mentions that even the Norse had their own cognate of Yima and Yama, named Ymir, who was a primordial giant whose death caused a great flood and was a basis behind the formation of the world. Ymir was still associated with a flood, as Snorri Sturluson recorded that they believed that the death of Ymir caused a great flood, killing all of the Frost Giants except one named Bergelmir, who floated on some wooden object with his wife and from him the Frost Giants come. The Bergelmir aspect may be due