Lunyu XV. 8. (399)

There are men with whom to speak, and men with whom to keep silence. The wise know them.
The Master said, "When a man may be spoken with, not to speak to him is to err in reference to the man. When a man may not be spoken with, to speak to him is to err in reference to our words. The wise err neither in regard to their man nor to their words."

Legge XV.7.

The Master said, 'To fail to speak to a man who is capable of benefiting is to let a man go to waste. To speak to a man who is incapable of benefiting is to let one's words go to waste. A wise man lets neither men nor words go to waste.'