1. I saw two pictures on the wall. I did not like either of them.
2. I saw two pictures on the wall. I did not like both of them.
I believe the first sentence is correct, buy why is the second wrong.
I dislike both paintings.
I don't like either painting.
It's interesting. It requires a negative verb 'dislike' if 'both' is used.