The most basic grammar is that prepositions take pronouns in the OBJECTIVE CASE - (nouns too, but there is no change in a noun between nominative and objective case.)
'who' is the nominative case form, and 'whom' is the objective case form.
Hence:
"Resume your ranks and legislative duties,
And take my daughters, all OF WHOM are beauties."
G&S: Pirates of Penzance.