Provided are compounds of formula (I) Wherein: ring A and ring B are each independently an optionally substituted 5 6 membered monocyclic aryl or heteroaryl. The compounds are inhibitors of isocitrate dehydrogenase 2 (IDH2) mutants useful for treating cancer.