But, to know a man well, were to know himself.

– William Shakespeare

Hamlet, Act 5, Scene 2. Hamlet to Osric, about Laertes. He is saying that you can only recognize in others what you know in yourself.