Pyrimidine is an organic compound, similar to benzene but with two nitrogen atoms taking the place of carbon atoms at positions 1 and 3 relative to each other around the six-member ring.
Three bases in nucleic acids, namely cytosine, guanine, and uracil, are pyrimidine derivatives. In DNA, these bases form hydrogen bonds with their complementary purines.
purine pyrimidine
A T
G C
In RNA, instead of T, U complements A:
purine pyrimidine
A U
G C
These hydrogen bonding modes are for classical Watson-Crick base pairing. Other hydrogen bonding modes are available in both DNA and RNA, although the additional 3'-hydroxyl group of RNA expands the configurations through which RNA can form hydrogen bonds.