Question: The works of which two scholars were used to teach Sanskrit to the higher castes of India?
Sentence: Knowledge of Sanskrit was a marker of social class and educational attainment in ancient India, and the language was taught mainly to members of the higher castes through the close analysis of Vyākaraṇins such as Pāṇini and Patanjali, who exhorted proper Sanskrit at all times, especially during ritual.
Answer in sentence: yes