Atmospheric nitrous oxide produced by solar protons and relativistic electrons