A Mechanism for Asteroids to Avoid Close Approach and Collision to Planets