59866
Their relationship was not always friendly , however ; on his way to seize the possessions of the Buyid Majd al-Daula of Ray in 1028 , Mahmud invaded the Ziyarid 's territory .
 Majd al-Daula, Ray, Mahmud
Please list all entity words in the text that fit the category. Output format is "word1, word2". 
Option: location, person, organization 
Text: {0} 
Answer:
 Majd al-Daula, Ray, Mahmud