The present invention provides a benzene derivativeor thiophene derivative useful as a VAP-1 inhibitor, or amedicament for the prophylaxis or treatment of a VAP-1associated disease and the like, namely, a compoundrepresented by the formula (I):(see formula I)wherein each symbol is as defined in the presentspecification, or a pharmaceutically acceptable salt thereof.