As far as I can see right now that's impossible: you need either the eigenvectors and their eigenspaces' dimensions, or what ammounts
to way more work and you ALSO need eigenvectors and etc. , their Jordan Canonical Forms.
I can't see any short cut for this in general. Now, for matrices of size up to 3x3, it's enough to know their characteristic and minimal
polynomials, but for that...