A pyrimidone derivative represented by formula (I) or a salt thereof, or a solvate thereof or a hydrate thereof:Wherein Y, Z, R1, R2, R3, R4, R5, R6, R7, n, m, and o are as described herein. The invention relates also to a medicament comprising the said derivative or a salt thereof as an active ingredient which is used for preventive and/or therapeutic treatment of a neurodegenerative disease caused by abnormal activity of GSK3β, such as Alzheimer disease.