A compound represented by formula (I) or a pharmaceutically acceptable salt thereof: (wherein Y 1 represents a nitrogen atom or a group represented by CR A , Y 2 represents a nitrogen atom or a group represented by CR B , Y 3 represents a nitrogen atom or a group represented by CR C , R A , R B and R C , which may be the same or different, each represent a hydrogen atom, etc. (excluding the case where Y 1 is CR A , Y 2 is CR B and Y 3 is CR C ), X represents an oxygen atom, etc., R 1 represents a C 1 -C 6 alkyl group, etc., R 2 represents a C 1 -C 6 alkyl group, etc., R 3 represents an optionally substituted phenyl group, etc., R 4 represents a hydrogen atom, etc., and R 5 represents an optionally substituted phenyl group, etc.) has an inhibitory effect on the binding between SIP and its receptor Edg-1(S1P 1 ), and is useful as a therapeutic agent for autoimmune diseases, rheumatoid arthritis, asthma, atopic dermatitis, rejection after organ transplantation, cancer, retinopathy, psoriasis, osteoarthritis, or age-related macular degeneration, etc.