Whom or Who in this sentence: These men, all of WHOM or WHO were well-known, well-respected statesmen, were viewed by their peers [duplicate]

Here's the full sentence: "These men, all of who were well-known, well-respected statesmen, were viewed by their peers and common people alike as great thinkers in their day.

I just can't really see where it would fall into: subject? predicate? object? What would it be?


Here's the formula I use for on-the-fly decisions on this common dilemma"

Who = he (singular) / they (plural)
Whom = him (singular) / them (plural)

Substitute the translations in the appropriate phrase:

...all of they were well-known... (?)
...all of them were well-known... (?)

Of course the proper choice is "them." So

...all of whom were well-known...