Isotopic composition of primary cosmic-ray nitrogen and oxygen with consequences for source models