Nuclear radii of Na and Mg isotopes