We study the spatial structure of four valence neutrons in the ground state of 8 He and 18 C nuclei using a core+4n model. For this purpose, we employ a density-dependent contact interaction among the valence neutrons, and solve the five-body Hamiltonian in the Hartree-Fock-Bogoliubov (HFB) approximation. We show that two neutrons with the coupled spin of S=0 exhibit a strong dineutron correlation around the surface of these nuclei, whereas the correlation between the two dineutrons is much weaker. Our calculation indicates that the probability of the (1p 3/2 ) 4 and [(1p 3/2 ) 2 (p 1/2 ) 2 ] configurations in the ground state wave function of 8 He nucleus is 34.9% and 23.7%, respectively. This is consistent with the recent experimental finding with the 8 He(p, t) 6 He reaction, that is, the ground state wave function of 8 He deviates significantly from the pure (1p 3/2 ) 4 structure.