<human>: Q: Which class of people founded the madaris during the medieval period?
 A: During the rule of the Fatimid and Mamluk dynasties and their successor states in the medieval Middle East, many of the ruling elite founded madaris through a religious endowment known as the waqf.
 Does the answer correctly answer the question

OPTIONS:
- yes
- no
<bot>: yes