Video version!
Proverbs and Fools
Prov. 26:4 Answer not a fool according to his folly, lest thou also be like unto him.
Prov. 26:5 Answer a fool according to his folly, lest he be wise in his own conceit.

What we have here is not contradiction, but dilemma -- an indication that when it comes to answering fools, you can't win -- because they are fools, and there is no practical cure for foolery. So: It is unwise to argue with a fool at his own level and recognize his own foolish suppositions, but it is good sometimes to refute him soundly, lest his foolishness seem to be confirmed by your silence.

Note further that proverbs are not absolutes -- which fits right in with our "dilemma" answer.