Is Mars warmed by the sun?

yes