In order for heat transfer to take place between two substances, what essential condition must exist?