Vaivasvata performed a fire sacrifice to obtain a son (putrakamyeshti). He got a daughter, Ila. Sage Vasishtha, at the request of Vaivasvata, transformed her into a son, Sudyumna. He later became Ila again, met Budha, Mercury, their son was Pururavas. He fell in love with the apsara Urvashi. Their son was Ayu. Ayus son was Nahusha.
Read about Pururavas and Urvashi here