A compound represented by formula (IA) or a pharmaceutically acceptable salt thereof, which acts relying on an orexin (OX) receptor antagonistic activity and is useful for the treatment or prevention of diseases such as sleep disorder, depression, anxiety disorder, panic disorder, schizophrenia, drug dependence, Alzheimer's disease, Parkinson's disease, Huntington's chorea, eating disorder, head ache, migraine, pain, gastrointestinal diseases, epilepsy, inflammations, immune-related diseases, endocrine-related diseases and hypertension.