We observe magnetic trapping of atomic nitrogen (14^N) and cotrapping of ground state imidogen (14^NH, X-triplet-Sigma-). Both are loaded directly from a room temperature beam via buffer gas cooling. We trap approximately 1 * 10^11 14^N atoms at a peak density of 5 * 10^11 cm^-3 at 550 mK. The 12 +5/-3 s 1/e lifetime of atomic nitrogen in the trap is limited by elastic collisions with the helium buffer gas. Cotrapping of 14^N and 14^NH is accomplished, with 10^8 NH trapped molecules at a peak density of 10^8 cm^-3. We observe no spin relaxation of nitrogen in collisions with helium.