知己知彼

Idiom

 * 1) to know yourself and know the enemy