why the inner planets are dense and rocky while the outer planets have low densities with no solid surfaces