The present invention provides a cyclic aminomethyl pyrimidine derivative including a pharmaceutically acceptable salt thereof with high selectivity for dopamine D
4
receptor, which is useful for treating a disease such as attention deficit hyperactivity disorder. Specifically, the present invention relates no a compound of formula (1) or a pharmaceutically acceptable salt thereof, wherein n and m are independently 1 or 2; W
1
, W
3
, and W
4
are independently single bond or optionally-substituted C
1-4
alkylene group; W
2
is optionally-substituted C
1-4
alkylene group; R
1
and R
2
are independently hydrogen atom, etc.; R
3
is hydrogen atom, halogen atom, etc.; X
1
and X
2
are independently single bond, oxygen atom, etc.; ring Q
1
is optionally-substituted 5- to 10-membered heteroaryl group, etc.; ring Q
2
is optionally-substituted 6-membered heteroaryl group, etc.
[EN] FUSED PYRAZOLE DERIVATIVE<br/>[FR] DÉRIVÉ DE PYRAZOLE FUSIONNÉ<br/>[JA] 縮合ピラゾール誘導体