The Heliocentric Distance Where the Deflections and Rotations of Solar Coronal Mass Ejections Occur