The quotes have a lot more meaning if you understand the context of the chapters they appear in, and that the term translated as “enemy” is closer in meaning to “a fellow competitor,” but here are the two major ones.
“Know yourself and know your enemy.
You will be safe in every battle.
You may know yourself but not know the enemy.
You will then lose one battle for every one you win.
You may not know yourself or the enemy.
You will then lose every battle.”
Art of War 3:6:1–6
Know the enemy and know yourself.
Your victory will be painless.
Know the weather and the field.
Your victory will be complete.”
Art of War 10:5:14–18
There are also two quotes in the chapter on spies, which is about collecting information generally, but the context if even more important there.