On the habitability of Earth and Mars