Psychologists generally agree that intelligence is influenced by both genetic factors (heredity) and environmental factors. Heredity contributes to the biological foundation of intelligence, while environmental factors, such as upbringing, education, and life experiences, help shape and enhance cognitive abilities. Therefore, the correct answer is "Heredity and environment."