We observe magnetic trapping of atomic nitrogen (N14) and cotrapping of ground-state imidogen (N14 H, X Σ-3). Both are loaded directly from a room-temperature beam via buffer gas cooling. We trap approximately 1× 1011 N14 atoms at a peak density of 5× 1011 cm-3 at 550 mK. The 12±4 s 1/e lifetime of atomic nitrogen in the trap is consistent with a model for loss of atoms over the edge of the trap in the presence of helium buffer gas. Cotrapping of N14 and N14 H is accomplished, with 108 NH trapped molecules at a peak density of 108 cm-3. © 2008 The American Physical Society.