Vitamin B12 is critical for the production of red blood cells, DNA synthesis, and the proper functioning of the nervous system. Folic acid (vitamin B9) is essential for DNA synthesis and the production of red blood cells. It is especially important during periods of rapid growth, such as pregnancy and infancy. When either vitamin is deficient, red blood cell production is impaired, leading to megaloblastic anemia, characterized by the production of large, underdeveloped red blood cells that cannot function properly to carry oxygen.