Provided herein are compounds of the formula (I): as well as pharmaceuticallyacceptable salts thereof, wherein the substituents are as those disclosed inthe specification. These compounds, and the pharmaceutical compositions containingthem, are useful for the treatment of diseases such as obesity, hyperlipidemia,hypercholesterolemia and diabetes and other related disorders and diseases,and may be useful for other diseases such as NASH, atherosclerosis, cardiovasculardiseases, hypothyroidism, thyroid cancer and other disorders and diseasesrelated thereto.