Uranium carbides and uranium nitrides are both relatively inert semimetallic compounds that are minimally soluble in acids, react with water, and can ignite in air to form U
3O
8. Carbides of uranium include uranium monocarbide (UC), uranium dicarbide (UC
2), and diuranium tricarbide (U
2C
3). Both UC and UC
2 are formed by adding carbon to molten uranium or by exposing the metal to carbon monoxide at high temperatures. Stable below 1800 °C, U
2C
3 is prepared by subjecting a heated mixture of UC and UC
2 to mechanical stress. Uranium nitrides obtained by direct exposure of the metal to nitrogen include uranium mononitride (UN), uranium dinitride (UN
2), and diuranium trinitride (U
2N
3).