What is the meaning of [diamond cuts diamond]

The only match for a very sharp-witted or cunning person is somebody of equally sharp wit or great cunning.