Edward Bulwer-Lytton
Richelieu; Or the Conspiracy, act 2, scene 2, 1839
The play's Cardinal Richelieu says it, in a longer line that compares the two under "men entirely great". A phrase older than the line, but this is where it got its modern form.
Source: Wikiquote