  With a Monte-Carlo model we investigate the escape of hot oxygen and carbon
from the martian atmosphere for four points in time in its history
corresponding to 1, 3, 10, and 20 times the present solar EUV flux. We study
and discuss different sources of hot oxygen and carbon atoms in the
thermosphere and their changing importance with the EUV flux. The increase of
the production rates due to higher densities resulting from the higher EUV flux
competes against the expansion of the thermosphere and corresponding increase
in collisions. We find that the escape due to photodissociation increases with
increasing EUV level. However, for the escape via some other reactions,
e.g.~dissociative recombination of O$_2^+$, this is only true until the EUV
level reaches 10 times the present EUV flux, and then the rates start to
decrease. Furthermore, our results show that Mars could not have had a dense
atmosphere at the end of the Noachian epoch, since such an atmosphere would not
have been able to escape until today. In the pre-Noachian era, most of a magma
ocean and volcanic activity related outgassed CO$_2$ atmosphere could have been
lost thermally until the Noachian epoch, when non-thermal loss processes such
as suprathermal atom escape became dominant. Thus, early Mars could have been
hot and wet during the pre-Noachian era with surface CO$_2$ pressures larger
than 1 bar during the first 300 Myr after the planet's origin.
