The present invention provides a method of treating ocular hypertension or glaucomawhich comprises administering to an animal having ocular hypertension or glaucomatherapeutically effective amount of a compound represented by the general formula(I) wherein X, Y, Z, D and R are as defined in the specification.