Medical science of the Middle Ages had a considerable influence on what was considered healthy and nutritious among the upper classes. One's lifestyle—including diet, exercise, appropriate social behavior, and approved medical remedies—was the way to good health, and all types of food were assigned certain properties that affected a person's health. All foodstuffs were also classified on scales ranging from hot to cold and moist to dry, according to the four bodily humours theory proposed by Galen that dominated Western medical science from late Antiquity until the 17th century.