In English, agreeing and disagreeing with negative statements and questions is a bit confusing, if not counterintuitive.
Don’t you like apples? No, I don’t.
Here you express agreement with no – you agree that you don’t like apples.
– It’s not cold.
– Yes, it is.
And here you contradict the speaker with yes – unlike them, you think it is cold.
The rule is to choose yes or no depending on your answer (yes if it’s positive and no if it’s negative) and not what it communicates (agreement or disagreement).
Didn’t you see the sign? No, I didn’t. (agreement but the answer is negative (I didn’t), therefore we use no)
You can’t afford this car. (Yes,) I can. (contradiction but the reply is positive (I can), therefore yes is used)
Hope you’ll never have trouble with this language point again. Did you just say “I won’t”? Great! And if you think you will, well maybe you should re-read this post.