أَيُّ الْفَرِيقَيْنِ خَيْرٌ مَقَامًا
Which of the two groups is better in standing? (Maryam 19:73)
Ayy identifies a particular member among alternatives sharing some class, category, or characteristic. The question is framed within a previously known set.
أَيُّ الْكِتَابَيْنِ قَرَأْتَ؟
Which of the two books did you read?
The alternatives are two particular books. Ayy is a declinable interrogative noun, with case varying according to its syntactic function. Unlike man, it need not be confined to rational beings; unlike mā, it is not restricted to asking about a thing's nature.