The term philosophy comes from a Greek term meaning "love of wisdom." In ancient Greece, literacy and an interest in the natural world were common in a burgeoning upper class. In their leisure time, these people contemplated principles of thinking and being, logic and mathematics, and the natures of reality and existence. In ancient times, the study of philosophy was indistinguishable from the study of science, and many of the theories formulated by the early philosophers became the basis for studies in the fields of astronomy, medicine, chemistry, and physics. The teachings and writings of the ancient philosophers of Greece and the Orient also, in part, laid the groundwork for many of the world's oldest organized religions.