PROBLEM TO BE SOLVED: To provide compounds used for treating diseases or conditions associated with janus kinase (JAK)2 activity and pharmaceutical compositions comprising the compounds.SOLUTION: The present invention provides a compound represented by formula (I) where n, m are 0-2; Y is =N- or the like; R1 is hydrogen, alkyl or the like; R2, 3 are alkyl or the like when they are present; R4 is aryl and heteroaryl; and R5 is N-heterocyclyl.【課題】ヤヌスキナーゼ(JAK)2活性に関連する疾患又は病態の治療に用いる化合物、及び該化合物を含む医薬組成物の提供。【解決手段】式(I)で表される化合物。[n、mは0~2;Yは=N-等;R1は水素、アルキル等;R2、3は各々存在する場合アルキル等;R4はアリール及びヘテロアリール;R5はN-ヘテロシクリル]【選択図】なし