  Nuclear modification factor ($R_{cp}$) of protons and pions are investigated
by simulating Au + Au collisions from 0.8 to 1.8$A$ GeV in a framework of an
isospin-dependent quantum molecular dynamics (IQMD) model. $R_{cp}$ of protons
rises with the increase of \pt~ at different beam energies owing to radial flow
and Cronin effect. The rate of increase of \rcp~ is suppressed at higher beam
energies. The significant difference of $R_{cp}$ between protons and pions
indicates different medium effects between protons and pions. By changing the
in-medium nucleon-nucleon cross section, the $R_{cp}$ of protons changes a lot,
while the $R_{cp}$ of pions does not. Taking the pion absorption into account,
the $R_{cp}$ of pions becomes close to unity without $p_{T}$ dependence after
deactivating the reaction $\pi N \rightarrow \Delta$, while there is nearly no
change on proton. This suggests that the pion absorption plays a dominant role
on pion dynamics and have slight effect for proton dynamics.
