When a Dobereiner's triad is considered, the sum of atomic weights of the terminal elements X and Z is 162.5. The atomic weight of Z is 50 units less than 5 times that of X. Identify the periods of X,Y and Z respectively in the present periodic table.