This invention provides a compound of the formula:or its pharmaceutically acceptable salt thereof, wherein A is partially unsaturated or unsaturated five membered heterocyclic, or partially unsaturated or unsaturated five membered carbocyclic, wherein the 4-(sulfonyl)phenyl and the 4-substituted phenyl in the formula (I) are attached to ring atoms of Ring A, which are adjacent to each other; R<1 >is optionally substituted aryl or heteroaryl, with the proviso that when A is pyrazole, R<1 >is heteroaryl; R<2 >is C1-4 alkyl, halo-substituted C1-4 alkyl, C1-4 alkylamino, C1-4 dialkylamino or amino; R<3>, R<4 >and R<5 >are independently hydrogen, halo,, C1-4 alkyl, halo-substituted C1-4 alkyl or the like; or two of R<3>, R<4 >and R<5 >are taken together with atoms to which they are attached and form a 4-7 membered ring; R<6 >and R<7 >are independently hydrogen, halo, C1-4 alkyl, halo-substituted C1-4 alkyl, C1-4 alkoxy, C1-4 alkylthio, C1-4 alkylamino or N,N-di C1-4 alkylamino; and m and n are independently 1, 2, 3 or 4.This invention also provides a pharmaceutical composition useful for the treatment of a medical condition in which prostaglandins are implicated as pathogens.