This invention provides pyrimidine derivatives represented by a formula,in the formula,ring A stands for carbocyclic group or heterocyclic group,X1 stands for hydrogen, lower alkyl, amino, etc.,X2 stands for hydrogen or lower alkyl,Y stands for a direct bond or sulfur or nitrogen,n stands for an integer of 0 - 4, andAr stands for a group of the following formula,or a salt thereof, which concurrently exhibit 5-HT1A agonistic activity and 5-HT3 antagonistic activity and are useful for therapy and treatments of diseases such as IBS.The invention furthermore provides a therapeutic method of IBS, characterized by having 5-HT1A agonistic activity and 5-HT3 antagonistic activity work simultaneously and cooperatively invivo, which comprises either administering 5-HT3 antagonistic agent which concurrently exhibits 5-HT1A agonistic activity, or administering 5-HT1A agonistic agent and 5-HT3 antagonistic agent simultaneously, in sequence or at an interval.