A compound represented by the formula (I):wherein each symbol is as described in the specification, or a salt thereof has a superior activity as an estrogen-related receptor-α modulator, and is useful as a prophylactic or therapeutic agent for cancer.