Nitrogen oxides are produced in automobile engines and other devices where combustion takes place. Indoors, gas ranges are a major source of nitrogen oxides. Chemical reactions between nitrogen oxides and hydrocarbon pollutants in sunlight produce ozone, a major constituent of an irritating mixture of pollutants and fog known as smog. Some nitrogen oxides in the air are converted to nitric acid, which contributes to the formation of acid rain.