We study roles of the thermosphere and exosphere on the Martian ionospheric structure and ion escape rates in the process of the solar wind-Mars interaction. We employ a four-species multifluid MHD (MF-MHD) model to simulate the Martian ionosphere and magnetosphere. The $cold$ thermosphere background is taken from the Mars Global Ionosphere Thermosphere Model (M-GITM) and the $hot$ oxygen exosphere is adopted from the Mars exosphere Monte Carlo model - Adaptive Mesh Particle Simulator (AMPS). A total of four cases with the combination of 1D (globally averaged) and 3D thermospheres and exospheres are studied. The ion escape rates calculated by adopting 1D and 3D atmospheres are similar; however, the latter are required to adequately reproduce MAVEN ionospheric observations. In addition, our simulations show that the 3D hot oxygen corona plays an important role in preventing planetary molecular ions (O$_2^+$ and CO$_2^+$) escaping from Mars, mainly resulting from the mass loading of the high-altitude exospheric O$^+$ ions. The $cold$ thermospheric oxygen atom, however, is demonstrated to be the primary neutral source for O$^+$ ion escape during the relatively weak solar cycle 24.